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


C# IResolver.IdentifyType方法代码示例

本文整理汇总了C#中IResolver.IdentifyType方法的典型用法代码示例。如果您正苦于以下问题:C# IResolver.IdentifyType方法的具体用法?C# IResolver.IdentifyType怎么用?C# IResolver.IdentifyType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IResolver的用法示例。


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

示例1: Resolve

        protected internal override void Resolve(IResolver resolver, bool canEnterContext)
        {
            base.Resolve(resolver, false);

            if (canEnterContext)
                resolver.Context.Enter(this.name.Identifier, false);

            for (int i = 0; i < this.BaseClasses.Count; i++)
            {
                if (this.BaseClasses[i] is TypeNode &&
                    !(this.BaseClasses[i] is IdentifiedTypeNode))
                {
                    IdentifiedTypeNode node = resolver.IdentifyType((TypeNode)this.BaseClasses[i]);

                    if (node != null)
                        this.BaseClasses[i] = node;
                }
                else
                {
                    throw new NotSupportedException();
                }
            }

            foreach (EnumNode node in this.Enums)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (ClassNode node in this.Classes)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (DelegateNode node in this.Delegates)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (InterfaceNode node in this.Interfaces)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (StructNode node in this.Structs)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (ConstantNode node in this.Constants)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (FieldNode node in this.Fields)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (PropertyNode node in this.Properties)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }


            foreach (ConstructorNode node in this.Constructors)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (DestructorNode node in this.Destructors)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (MethodNode node in this.Methods)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (OperatorNode node in this.Operators)
            {
                node.Parent = this;
                node.Resolve(resolver);
            }

            foreach (IndexerNode node in this.Indexers)
            {
                node.Parent = this;
                node.Resolve(resolver);
//.........这里部分代码省略.........
开发者ID:mintberry,项目名称:stackrecaller,代码行数:101,代码来源:ClassNode.cs


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