当前位置: 首页>>代码示例>>C#>>正文


C# FixedFieldDeclaration类代码示例

本文整理汇总了C#中FixedFieldDeclaration的典型用法代码示例。如果您正苦于以下问题:C# FixedFieldDeclaration类的具体用法?C# FixedFieldDeclaration怎么用?C# FixedFieldDeclaration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FixedFieldDeclaration类属于命名空间,在下文中一共展示了FixedFieldDeclaration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleVisitorFixedFieldDeclarationVisited

		void HandleVisitorFixedFieldDeclarationVisited (FixedFieldDeclaration node, InspectionData data)
		{
			foreach (var rule in policy.Rules) {
				if (rule.CheckField (node, data))
					return;
			}
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:7,代码来源:NamingInspector.cs

示例2: VisitFixedFieldDeclaration

		public void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
		{
			StartNode(fixedFieldDeclaration);
			WriteAttributes(fixedFieldDeclaration.Attributes);
			WriteModifiers(fixedFieldDeclaration.ModifierTokens);
			WriteKeyword(FixedFieldDeclaration.FixedKeywordRole);
			Space();
			fixedFieldDeclaration.ReturnType.AcceptVisitor(this);
			Space();
			WriteCommaSeparatedList(fixedFieldDeclaration.Variables);
			Semicolon();
			EndNode(fixedFieldDeclaration);
		}
开发者ID:x-strong,项目名称:ILSpy,代码行数:13,代码来源:CSharpOutputVisitor.cs

示例3: VisitFixedFieldDeclaration

		public virtual void VisitFixedFieldDeclaration (FixedFieldDeclaration fixedFieldDeclaration)
		{
			VisitChildren (fixedFieldDeclaration);
		}
开发者ID:modulexcite,项目名称:ICSharpCode.Decompiler-retired,代码行数:4,代码来源:DepthFirstAstVisitor.cs

示例4: Visit

			public override void Visit(FixedField f)
			{
				var location = LocationsBag.GetMemberLocation(f);
				int locationIdx = 0;
				
				var newField = new FixedFieldDeclaration();
				AddAttributeSection(newField, f);
				AddModifiers(newField, location);
				if (location != null && location.Count > 0)
					newField.AddChild(new CSharpTokenNode(Convert(location [locationIdx++]), FixedFieldDeclaration.FixedKeywordRole), FixedFieldDeclaration.FixedKeywordRole);

				if (f.TypeExpression != null)
					newField.AddChild(ConvertToType(f.TypeExpression), Roles.Type);
				
				var variable = new FixedVariableInitializer();
				variable.AddChild(Identifier.Create(f.MemberName.Name, Convert(f.MemberName.Location)), Roles.Identifier);
				if (f.Initializer != null && !f.Initializer.IsNull) {
					variable.AddChild(new CSharpTokenNode(Convert(f.Initializer.Location), Roles.LBracket), Roles.LBracket);
					
					variable.AddChild((Expression)f.Initializer.Accept(this), Roles.Expression);
					var bracketLocations = LocationsBag.GetLocations(f.Initializer);
					if (bracketLocations != null)
						variable.AddChild(new CSharpTokenNode(Convert(bracketLocations [0]), Roles.RBracket), Roles.RBracket);
				}
				newField.AddChild(variable, FixedFieldDeclaration.VariableRole);
				
				if (f.Declarators != null) {
					foreach (var decl in f.Declarators) {
						var declLoc = LocationsBag.GetLocations(decl);
						if (declLoc != null)
							newField.AddChild(new CSharpTokenNode(Convert(declLoc [0]), Roles.Comma), Roles.Comma);
						
						variable = new FixedVariableInitializer();
						variable.AddChild(Identifier.Create(decl.Name.Value, Convert(decl.Name.Location)), Roles.Identifier);
						variable.AddChild(new CSharpTokenNode(Convert(decl.Initializer.Location), Roles.LBracket), Roles.LBracket);
						variable.AddChild((Expression)decl.Initializer.Accept(this), Roles.Expression);
						var bracketLocations = LocationsBag.GetLocations(decl.Initializer);
						if (bracketLocations != null)
							variable.AddChild(new CSharpTokenNode(Convert(bracketLocations [0]), Roles.RBracket), Roles.RBracket);

						newField.AddChild(variable, FixedFieldDeclaration.VariableRole);
					}
				}
				if (location != null && location.Count > locationIdx)
					newField.AddChild(new CSharpTokenNode(Convert(location [locationIdx]), Roles.Semicolon), Roles.Semicolon);
				typeStack.Peek().AddChild(newField, Roles.TypeMemberRole);
				
			}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:48,代码来源:CSharpParser.cs

示例5: VisitFixedFieldDeclaration

 public virtual void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
 {
     if (this.ThrowException)
     {
         throw (Exception)this.CreateException(fixedFieldDeclaration);
     }
 }
开发者ID:fabriciomurta,项目名称:BridgeUnified,代码行数:7,代码来源:Visitor.Exception.cs

示例6: VisitFixedFieldDeclaration

        public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
        {
            FixAttributesAndDocComment(fixedFieldDeclaration);

            FormatCommas(fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma);

            var lastLoc = fixedFieldDeclaration.StartLocation;
            curIndent.Push(IndentType.Block);
            foreach (var initializer in fixedFieldDeclaration.Variables) {
                if (lastLoc.Line != initializer.StartLocation.Line) {
                    FixStatementIndentation(initializer.StartLocation);
                    lastLoc = initializer.StartLocation;
                }
                initializer.AcceptVisitor(this);
            }
            curIndent.Pop();
            FixSemicolon(fixedFieldDeclaration.SemicolonToken);
        }
开发者ID:porcus,项目名称:NRefactory,代码行数:18,代码来源:FormattingVisitor_TypeMembers.cs

示例7: VisitFixedFieldDeclaration

 public StringBuilder VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration, int data)
 {
     throw new SLSharpException("SL# does not understand the fixed keyword.");
 }
开发者ID:hach-que,项目名称:SLSharp,代码行数:4,代码来源:VisitorBase.Illegal.cs

示例8: VisitFixedFieldDeclaration

		public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
		{
			FormatAttributedNode(fixedFieldDeclaration);
			FormatCommas(fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma);
			if (fixedFieldDeclaration.NextSibling is FieldDeclaration || fixedFieldDeclaration.NextSibling is FixedFieldDeclaration) {
				EnsureBlankLinesAfter(fixedFieldDeclaration, policy.BlankLinesBetweenFields);
			} else if (IsMember(fixedFieldDeclaration.NextSibling)) {
				EnsureBlankLinesAfter(fixedFieldDeclaration, policy.BlankLinesBetweenMembers);
			}
			
			var lastLoc = fixedFieldDeclaration.StartLocation;
			curIndent.Push(IndentType.Block);
			foreach (var initializer in fixedFieldDeclaration.Variables) {
				if (lastLoc.Line != initializer.StartLocation.Line) {
					FixStatementIndentation(initializer.StartLocation);
					lastLoc = initializer.StartLocation;
				}
				initializer.AcceptVisitor(this);
			}
			curIndent.Pop ();
		}
开发者ID:txdv,项目名称:monodevelop,代码行数:21,代码来源:AstFormattingVisitor.cs

示例9: Visit

			public override void Visit (FixedField f)
			{
				var location = LocationsBag.GetMemberLocation (f);
				
				var newField = new FixedFieldDeclaration ();
				AddAttributeSection (newField, f);
				AddModifiers (newField, location);
				if (location != null)
					newField.AddChild (new CSharpTokenNode (Convert (location [0]), "fixed".Length), FixedFieldDeclaration.Roles.Keyword);
				newField.AddChild (ConvertToType (f.TypeName), FixedFieldDeclaration.Roles.Type);
				
				var variable = new FixedVariableInitializer ();
				variable.AddChild (new Identifier (f.MemberName.Name, Convert (f.MemberName.Location)), FixedFieldDeclaration.Roles.Identifier);
				if (!f.Initializer.IsNull) {
					var bracketLocations = LocationsBag.GetLocations (f.Initializer);
					if (bracketLocations != null && bracketLocations.Count > 1)
						variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.LBracket);
						
					variable.AddChild ((Expression)f.Initializer.Accept (this), FieldDeclaration.Roles.Expression);
					if (bracketLocations != null && bracketLocations.Count > 1)
						variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket);
				}
				newField.AddChild (variable, FixedFieldDeclaration.VariableRole);
				
				if (f.Declarators != null) {
					foreach (var decl in f.Declarators) {
						var declLoc = LocationsBag.GetLocations (decl);
						if (declLoc != null)
							newField.AddChild (new CSharpTokenNode (Convert (declLoc [0]), 1), FieldDeclaration.Roles.Comma);
						
						variable = new FixedVariableInitializer ();
						variable.AddChild (new Identifier (decl.Name.Value, Convert (decl.Name.Location)), FieldDeclaration.Roles.Identifier);
						if (!decl.Initializer.IsNull) {
							var bracketLocations = LocationsBag.GetLocations (f.Initializer);
							if (bracketLocations != null && bracketLocations.Count > 1)
								variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.LBracket);
							variable.AddChild ((Expression)decl.Initializer.Accept (this), FieldDeclaration.Roles.Expression);
							if (bracketLocations != null && bracketLocations.Count > 1)
								variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket);
						}
						newField.AddChild (variable, FixedFieldDeclaration.VariableRole);
					}
				}
				if (location != null)
					newField.AddChild (new CSharpTokenNode (Convert (location [1]), 1), FieldDeclaration.Roles.Semicolon);
				typeStack.Peek ().AddChild (newField, TypeDeclaration.MemberRole);
				
			}
开发者ID:rmattuschka,项目名称:ILSpy,代码行数:48,代码来源:CSharpParser.cs

示例10: VisitFixedFieldDeclaration

			public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
			{
				base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
				var entity = AffectedEntity.Field;
				if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Const)) {
					entity = AffectedEntity.ConstantField;
				} else if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Readonly)) {
					entity = AffectedEntity.ReadonlyField;
				}
				CheckName(fixedFieldDeclaration, entity, fixedFieldDeclaration.NameToken, GetAccessibiltiy(fixedFieldDeclaration, Modifiers.Private));
			}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:11,代码来源:InconsistentNamingIssue.cs

示例11: VisitFixedFieldDeclaration

			public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
			{
				base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
				CheckNode(fixedFieldDeclaration);
			}
开发者ID:Gobiner,项目名称:ILSpy,代码行数:5,代码来源:RedundantPrivateIssue.cs

示例12: VisitFixedFieldDeclaration

 public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
 {
     if (fixedFieldDeclaration.HasModifier(Modifiers.Static))
     {
         this.CheckDependency(fixedFieldDeclaration.ReturnType);
         base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
     }
 }
开发者ID:TinkerWorX,项目名称:Bridge,代码行数:8,代码来源:DependencyFinderVisitor.cs

示例13: VisitFixedFieldDeclaration

 public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
 {
     // nothing
 }
开发者ID:kaagati,项目名称:NRefactory,代码行数:4,代码来源:CallToVirtualFunctionFromConstructorIssue.cs

示例14: VisitFixedFieldDeclaration

        public void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
        {
            JsonObject declaration = CreateJsonEntityDeclaration(fixedFieldDeclaration);


            AddKeyword(declaration, FixedFieldDeclaration.FixedKeywordRole);
            declaration.AddJsonValue("variables", GetCommaSeparatedList(fixedFieldDeclaration.Variables));

            Push(declaration);
            throw new FirstTimeUseException();
        }
开发者ID:CompilerKit,项目名称:CodeWalk,代码行数:11,代码来源:AstCsToJson.cs

示例15: VisitFixedFieldDeclaration

 public void VisitFixedFieldDeclaration(FixedFieldDeclaration node)
 {
     NotSupported(node);
 }
开发者ID:evanw,项目名称:minisharp,代码行数:4,代码来源:Lower.cs


注:本文中的FixedFieldDeclaration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。