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


C# ITypeDeclaration类代码示例

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


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

示例1: BinaryFormula

 protected internal BinaryFormula(NodeType nodeType, IFormula left, IFormula right, ITypeDeclaration type, IMethodDeclaration method, IFormula parent)
     : base(nodeType, type, parent)
 {
     Left = left;
     Method = method;
     Right = right;
 }
开发者ID:urasandesu,项目名称:NTroll,代码行数:7,代码来源:BinaryFormula.cs

示例2: ConditionalFormula

 protected internal ConditionalFormula(IFormula test, IFormula ifTrue, IFormula ifFalse, ITypeDeclaration type, IFormula parent)
     : base(NodeType.Conditional, type, parent)
 {
     Test = test;
     IfTrue = ifTrue;
     IfFalse = ifFalse;
 }
开发者ID:urasandesu,项目名称:NTroll,代码行数:7,代码来源:ConditionalFormula.cs

示例3: MarkTypeAsUsed

        public void MarkTypeAsUsed(ITypeDeclaration declaration)
        {
            SetConstructorsState(declaration.DeclaredElement, UsageState.USED_MASK | UsageState.CANNOT_BE_PRIVATE |
                                                         UsageState.CANNOT_BE_INTERNAL | UsageState.CANNOT_BE_PROTECTED);

            collectUsagesStageProcess.SetElementState(declaration.DeclaredElement, UsageState.ACCESSED);
        }
开发者ID:renana,项目名称:AgentMulder,代码行数:7,代码来源:TypeUsageManager.cs

示例4: EqualFormulaRef

 protected internal EqualFormulaRef(IFormulaRef left, IFormulaRef right, ITypeDeclaration type, IMethodDeclaration method, IFormulaRef parent)
     : base(left, right, type, method, parent)
 {
     this.parent = parent;
     this.left = left;
     this.right = right;
 }
开发者ID:urasandesu,项目名称:NTroll,代码行数:7,代码来源:EqualFormulaRef.cs

示例5: TryConvertTypeDeclaration

        public static IExpression TryConvertTypeDeclaration(ITypeDeclaration td, bool ignoreInnerDeclaration = false)
        {
            if (td.InnerDeclaration == null || ignoreInnerDeclaration)
            {
                if (td is IdentifierDeclaration)
                {
                    var id = td as IdentifierDeclaration;
                    if (id.Id == null)
                        return null;
                    return new IdentifierExpression(id.Id) { Location = id.Location, EndLocation = id.EndLocation };
                }
                if (td is TemplateInstanceExpression)
                    return td as IExpression;

                return null;
            }

            var pfa = new PostfixExpression_Access{
                PostfixForeExpression = TryConvertTypeDeclaration(td.InnerDeclaration),
                AccessExpression  = TryConvertTypeDeclaration(td, true)
            };
            if (pfa.PostfixForeExpression == null)
                return null;
            return pfa;
        }
开发者ID:DinrusGroup,项目名称:DRC,代码行数:25,代码来源:AbstractCompletionProvider.cs

示例6: DemangleAndResolve

		public static AbstractType DemangleAndResolve(string mangledString, ResolutionContext ctxt, out ITypeDeclaration qualifier)
		{
			bool isCFunction;
			Demangler.Demangle(mangledString, ctxt, out qualifier, out isCFunction);
			
			// Seek for C functions | Functions that have no direct module association (e.g. _Dmain)
			if(qualifier is IdentifierDeclaration && qualifier.InnerDeclaration == null)
			{
				var id = (qualifier as IdentifierDeclaration).Id;
				return Resolver.ASTScanner.NameScan.ScanForCFunction(ctxt, id, isCFunction);
			}
			
			bool seekCtor = false;
			if(qualifier is IdentifierDeclaration)
			{
				var id = (qualifier as IdentifierDeclaration).Id;
				if((seekCtor = (id == DMethod.ConstructorIdentifier)) || id == "__Class" || id =="__ModuleInfo")
					qualifier = qualifier.InnerDeclaration;
			}

			var resSym = TypeDeclarationResolver.ResolveSingle(qualifier,ctxt);
			
			if(seekCtor && resSym is UserDefinedType)
			{
				var ctor = (resSym as TemplateIntermediateType).Definition[DMethod.ConstructorIdentifier].FirstOrDefault();
				if(ctor!= null)
					resSym = new MemberSymbol(ctor as DNode, null, null);
			}
			return resSym;
		}
开发者ID:DinrusGroup,项目名称:D_Parser,代码行数:30,代码来源:Demangler.cs

示例7: HandleDecl

        public bool HandleDecl(TemplateTypeParameter p ,ITypeDeclaration td, ISemantic rr)
        {
            if (td is IdentifierDeclaration)
                return HandleDecl(p,(IdentifierDeclaration)td, rr);

            //HACK Ensure that no information gets lost by using this function
            // -- getting a value but requiring an abstract type and just extract it from the value - is this correct behaviour?
            var at = AbstractType.Get(rr);

            if (td is ArrayDecl)
                return HandleDecl(p,(ArrayDecl)td, DResolver.StripMemberSymbols(at) as AssocArrayType);
            else if (td is DTokenDeclaration)
                return HandleDecl((DTokenDeclaration)td, at);
            else if (td is DelegateDeclaration)
                return HandleDecl(p, (DelegateDeclaration)td, DResolver.StripMemberSymbols(at) as DelegateType);
            else if (td is PointerDecl)
                return HandleDecl(p, (PointerDecl)td, DResolver.StripMemberSymbols(at) as PointerType);
            else if (td is MemberFunctionAttributeDecl)
                return HandleDecl(p,(MemberFunctionAttributeDecl)td, at);
            else if (td is TypeOfDeclaration)
                return HandleDecl((TypeOfDeclaration)td, at);
            else if (td is VectorDeclaration)
                return HandleDecl((VectorDeclaration)td, at);
            else if (td is TemplateInstanceExpression)
                return HandleDecl(p,(TemplateInstanceExpression)td, at);

            return false;
        }
开发者ID:Extrawurst,项目名称:D_Parser,代码行数:28,代码来源:TemplateTypeParameterDeduction.cs

示例8: Demangle

        public static AbstractType Demangle(string mangledString, ResolutionContext ctxt, out ITypeDeclaration qualifier, out bool isCFunction)
        {
            if(string.IsNullOrEmpty(mangledString))
                throw new ArgumentException("input string must not be null or empty!");

            if (!mangledString.StartsWith("_D"))
            {
                isCFunction = true;

                if (mangledString.StartsWith ("__D"))
                    mangledString = mangledString.Substring (1);
                // C Functions
                else if (mangledString.StartsWith ("_")) {
                    qualifier = new IdentifierDeclaration (mangledString.Substring (1));
                    return null;
                }
            }

            //TODO: What about C functions that start with 'D'?
            isCFunction = false;

            var dmng = new Demangler(mangledString) { ctxt = ctxt };

            return dmng.MangledName(out qualifier);
        }
开发者ID:default0,项目名称:D_Parser,代码行数:25,代码来源:Demangler.cs

示例9: Demangle

		public static AbstractType Demangle(string mangledString, out ITypeDeclaration qualifier, out bool isCFunction)
		{
			if(string.IsNullOrEmpty(mangledString))
				throw new ArgumentException("строка ввода должна не быть пустой или null!");
			
			if (!mangledString.StartsWith("_D"))
			{
				isCFunction = true;

				if (mangledString.StartsWith ("__D"))
					mangledString = mangledString.Substring (1);
				// C Functions
				else if (mangledString.StartsWith ("_")) {
					qualifier = new IdentifierDeclaration (mangledString.Substring (1));
					return null;
				}
			}

			//TODO: What about C functions that start with 'D'?
			isCFunction = false;
			
			var dmng = new Demangler(mangledString);
			
			return dmng.MangledName(out qualifier);
		}
开发者ID:DinrusGroup,项目名称:DinrusIDE,代码行数:25,代码来源:Demangler.cs

示例10: FieldDeclaration

 internal FieldDeclaration(string name, Declaration declaringType, ITypeDeclaration type)
     : base(name,declaringType)
 {
     if (type==null)
         throw new ArgumentNullException("type");
     this.type = type;
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:7,代码来源:FieldDeclaration.cs

示例11: EventDeclaration

 internal EventDeclaration(string name, Declaration declaringType, ITypeDeclaration type)
     : base(name,declaringType)
 {
     if (type==null)
         throw new ArgumentNullException("type");
     this.type = type;
     this.Attributes = MemberAttributes.Public;
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:8,代码来源:EventDeclaration.cs

示例12: ObjectCreationExpression

        public ObjectCreationExpression(ITypeDeclaration type, params Expression[] args)
        {
            if (type==null)
                throw new ArgumentNullException("type");

            this.type = type;
            this.args.AddRange(args);
        }
开发者ID:spib,项目名称:nhcontrib,代码行数:8,代码来源:ObjectCreationExpression.cs

示例13: IndexerDeclaration

 internal IndexerDeclaration(
     Declaration declaringType,
     ITypeDeclaration returnType)
     : base("Item",declaringType)
 {
     this.signature.ReturnType = returnType;
     this.Attributes = MemberAttributes.Public;
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:8,代码来源:IndexerDeclaration.cs

示例14: TypeData

		public TypeData (ITypeDeclaration typeDecl) 
		{
			declaration = typeDecl;
			Type = declaration.Type;
			col = declaration.col;

			InputKnob = ResourceManager.GetTintedTexture (declaration.InputKnob_TexPath, col);
			OutputKnob = ResourceManager.GetTintedTexture (declaration.OutputKnob_TexPath, col);
		}
开发者ID:Avatarchik,项目名称:Node_Editor,代码行数:9,代码来源:ConnectionTypes.cs

示例15: TypeData

		public TypeData (ITypeDeclaration typeDecl) 
		{
			Declaration = typeDecl;
			Type = Declaration.Type;
			Col = Declaration.Col;

			InputKnob = ResourceManager.GetTintedTexture (Declaration.InputKnobTexPath, Col);
			OutputKnob = ResourceManager.GetTintedTexture (Declaration.OutputKnobTexPath, Col);
		}
开发者ID:Zeloder,项目名称:Node_Editor,代码行数:9,代码来源:ConnectionTypes.cs


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