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


C# Identifier类代码示例

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


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

示例1: findAssignment

        public HashSet<Assign> findAssignment(Identifier i, HashSet<Statement> visitedNodes)
        {
            HashSet<Assign> assignStatements = new HashSet<Assign>();

            if (this is Assign && ((Assign)this).identifier.declaration == i.declaration)
            {
                assignStatements.Add((Assign)this);
                return assignStatements;
            }
            else if (this.cfgPredecessors.Count > 0)
            {
                foreach (Statement predecessor in this.cfgPredecessors)
                {
                    if (!(visitedNodes.Contains(predecessor)))
                    {
                        visitedNodes.Add(predecessor);
                        assignStatements.UnionWith(predecessor.findAssignment(i, visitedNodes));
                    }
                }

                return assignStatements;
            }
            else
            {
                throw new AccessException(i.row, i.col, "This value has not been initialised.");
            }
        }
开发者ID:noilly,项目名称:ginger,代码行数:27,代码来源:SLNode.cs

示例2: DocumentedProperty

 public DocumentedProperty(Identifier name, XmlNode xml, PropertyInfo property, Type targetType)
 {
     Property = property;
     Xml = xml;
     Name = name;
     TargetType = targetType;
 }
开发者ID:cdrnet,项目名称:docu,代码行数:7,代码来源:DocumentedProperty.cs

示例3: ExceptHandler

 public ExceptHandler(Exp type, Identifier name, SuiteStatement body, string filename, int start, int end)
     : base(filename, start, end)
 {
     this.type = type;
     this.name = name;
     this.body = body;
 }
开发者ID:uxmal,项目名称:pytocs,代码行数:7,代码来源:ExceptHandler.cs

示例4: Control

        public Control(ISensor sensor, ISettings settings, float minSoftwareValue,
            float maxSoftwareValue)
        {
            this.identifier = new Identifier(sensor.Identifier, "control");
              this.settings = settings;
              this.minSoftwareValue = minSoftwareValue;
              this.maxSoftwareValue = maxSoftwareValue;

              if (!float.TryParse(settings.GetValue(
              new Identifier(identifier, "value").ToString(), "0"),
            NumberStyles.Float, CultureInfo.InvariantCulture,
            out this.softwareValue))
              {
            this.softwareValue = 0;
              }
              int mode;
              if (!int.TryParse(settings.GetValue(
              new Identifier(identifier, "mode").ToString(),
              ((int)ControlMode.Default).ToString(CultureInfo.InvariantCulture)),
            NumberStyles.Integer, CultureInfo.InvariantCulture,
            out mode))
              {
            this.mode = ControlMode.Default;
              } else {
            this.mode = (ControlMode)mode;
              }
        }
开发者ID:Ryks,项目名称:open-hardware-monitor,代码行数:27,代码来源:Control.cs

示例5: FunctionInvocationExpression

		public FunctionInvocationExpression(Identifier identifier, ExpressionNode[] arguments, bool hasStarModifier)
			: this()
		{
			_name = identifier;
			_arguments = arguments;
			_hasAsteriskModifier = hasStarModifier;
		}
开发者ID:chenzuo,项目名称:nquery,代码行数:7,代码来源:FunctionInvocationExpression.cs

示例6: RelshipNavigationExpr

 /// <summary>
 ///     Initializes relationship navigation expression.
 /// </summary>
 internal RelshipNavigationExpr(Node refExpr, Node relshipTypeName, Identifier toEndIdentifier, Identifier fromEndIdentifier)
 {
     _refExpr = refExpr;
     _relshipTypeName = relshipTypeName;
     _toEndIdentifier = toEndIdentifier;
     _fromEndIdentifier = fromEndIdentifier;
 }
开发者ID:christiandpena,项目名称:entityframework,代码行数:10,代码来源:NavigationExpr.cs

示例7: Hardware

 public Hardware(string name, Identifier identifier, ISettings settings) {
   this.settings = settings;
   this.identifier = identifier;
   this.name = name;
   this.customName = settings.GetValue(
     new Identifier(Identifier, "name").ToString(), name);
 }
开发者ID:sakisds,项目名称:Icy-Monitor,代码行数:7,代码来源:Hardware.cs

示例8: Def

		private Instruction Def(Identifier id, Expression src)
		{
			if (IsLocal(id))
				return new Store(new MemoryAccess(MemoryIdentifier.GlobalMemory, EffectiveAddress(id), id.DataType), src);
			else 
				return new Assignment(id, src);
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:EscapedAccessRewriter.cs

示例9: MethodParameterInfoContext

		public MethodParameterInfoContext(SourceLocation sourceLocation, int parameterIndex, Scope scope, Type expressionType, Identifier methodName)
			: base(sourceLocation, parameterIndex)
		{
			_scope = scope;
			_expressionType = expressionType;
			_methodName = methodName;
		}
开发者ID:chenzuo,项目名称:nquery,代码行数:7,代码来源:MethodParameterInfoContext.cs

示例10: PersonA

 public PersonA(Identifier<int> id, string name, int age, int version)
 {
     _id = id;
       _name = name;
       _age = age;
       _version = version;
 }
开发者ID:nertsch,项目名称:outlookcaldavsynchronizer,代码行数:7,代码来源:PersonA.cs

示例11: Setup

 public void Setup()
 {
     mr = new MockRepository();
     program = new Program();
     proc = new Procedure("testProc", new Frame(PrimitiveType.Word32));
     block = proc.AddBlock("l00100000");
     trace = new RtlTrace(0x00100000);
     r0 = new Identifier("r0", PrimitiveType.Word32, new RegisterStorage("r0", 0, 0, PrimitiveType.Word32));
     r1 = new Identifier("r1", PrimitiveType.Word32, new RegisterStorage("r1", 1, 0, PrimitiveType.Word32));
     r2 = new Identifier("r2", PrimitiveType.Word32, new RegisterStorage("r2", 2, 0, PrimitiveType.Word32));
     sp = new Identifier("sp", PrimitiveType.Word32, new RegisterStorage("sp", 15, 0, PrimitiveType.Word32));
     grf = proc.Frame.EnsureFlagGroup(Registers.eflags, 3, "SCZ", PrimitiveType.Byte);
     var sc = new ServiceContainer();
     var listener = mr.Stub<DecompilerEventListener>();
     scanner = mr.StrictMock<IScanner>();
     arch = mr.Stub<IProcessorArchitecture>();
     program.Architecture = arch;
     program.SegmentMap = new SegmentMap(
         Address.Ptr32(0x00100000),
         new ImageSegment(
             ".text",
             new MemoryArea(Address.Ptr32(0x00100000), new byte[0x20000]),
             AccessMode.ReadExecute));
     arch.Replay();
     program.Platform = new DefaultPlatform(null, arch);
     arch.BackToRecord();
     arch.Stub(s => s.StackRegister).Return((RegisterStorage)sp.Storage);
     arch.Stub(s => s.PointerType).Return(PrimitiveType.Pointer32);
     scanner.Stub(s => s.Services).Return(sc);
     sc.AddService<DecompilerEventListener>(listener);
 }
开发者ID:relaxar,项目名称:reko,代码行数:31,代码来源:BlockWorkitemTests.cs

示例12: LabelStatement

		public LabelStatement(Identifier Label, Statement Labeled, TextSpan Location, TextPoint Colon)
			:base(Operation.Label,Location)
		{
			this.Label = Label;
			this.Labeled = Labeled;
			this.Colon = Colon;
		}
开发者ID:alesliehughes,项目名称:olive,代码行数:7,代码来源:LabelStatement.cs

示例13: Match

		public bool Match(BinaryExpression exp)
		{
			if (exp.Operator != Operator.IAdd)
				return false;
			id = exp.Left as Identifier;
			
			bin = exp.Right as BinaryExpression;
			if ((id == null || bin == null) && exp.Operator  == Operator.IAdd)
			{
				id = exp.Right as Identifier;
				bin = exp.Left as BinaryExpression;
			}
			if (id == null || bin == null)
				return false;

			if (bin.Operator != Operator.SMul && bin.Operator != Operator.UMul && bin.Operator != Operator.IMul)
				return false;

			Identifier idInner = bin.Left as Identifier;
			cInner = bin.Right as Constant;
			if (idInner == null ||cInner == null)
				return false;

			if (idInner != id)
				return false;

			return true;
		}
开发者ID:killbug2004,项目名称:reko,代码行数:28,代码来源:Add_mul_id_c_id_Rule.cs

示例14: Eval

			/// <summary>
			/// Returns the value that matches the hash key given as the first given parameter.
			/// </summary>
			public override L20nObject Eval(LocaleContext ctx, params L20nObject[] argv)
			{
				if (m_Items.Count == 0 || argv.Length < 1)
				{
					return null;
				}
				
				var first = argv [0].Eval(ctx);
				
				Identifier id = first as Identifier;
				if (id == null)
				{
					var str = first as StringOutput;
					if (str == null)
					{
						Logger.Warning("Attributes: first variadic argument couldn't be evaluated as an <Identifier>");
						return id;
					}
					
					id = new Identifier(str.Value);
				}	
				
				L20nObject obj;
				if (!m_Items.TryGetValue(id.Value, out obj))
				{
					Logger.WarningFormat("{0} is not a valid <identifier>", id.Value);
					return null;
				}

				return obj;
			}
开发者ID:GlenDC,项目名称:L20n.cs,代码行数:34,代码来源:Attributes.cs

示例15: CheckName

			void CheckName(TypeDeclaration node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
			{
				TypeResolveResult resolveResult = ctx.Resolve(node) as TypeResolveResult;
				if (resolveResult == null)
					return;
				var type = resolveResult.Type;
				if (type.DirectBaseTypes.Any(t => t.FullName == "System.Attribute")) {
					if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomAttributes, identifier, accessibilty)) {
						return;
					}
				} else if (type.DirectBaseTypes.Any(t => t.FullName == "System.EventArgs")) {
					if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomEventArgs, identifier, accessibilty)) {
						return;
					}
				} else if (type.DirectBaseTypes.Any(t => t.FullName == "System.Exception")) {
					if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomExceptions, identifier, accessibilty)) {
						return;
					}
				}

				var typeDef = type.GetDefinition();
				if (typeDef != null && typeDef.Attributes.Any(attr => attr.AttributeType.FullName == "NUnit.Framework.TestFixtureAttribute")) {
					if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.TestType, identifier, accessibilty)) {
						return;
					}
				}

				CheckNamedResolveResult(resolveResult, node, entity, identifier, accessibilty);
			}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:29,代码来源:InconsistentNamingIssue.cs


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