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


C# ITypeResolver.Resolve方法代码示例

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


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

示例1: Resolve

        public static PersistentReturnType Resolve(IReturnType source, ITypeResolver typeResolver)
        {
            if (source == null) return null;

            PersistentReturnType rt = new PersistentReturnType ();
            rt.FullyQualifiedName = typeResolver.Resolve (source.FullyQualifiedName);
            rt.pointerNestingLevel = source.PointerNestingLevel;
            rt.arrayDimensions = source.ArrayDimensions;
            return rt;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:10,代码来源:PersistentReturnType.cs

示例2: GetDependencies

        public static IEnumerable<object> GetDependencies(this IEnumerable<ParameterInfo> parameterInfos, ITypeResolver typeResolver)
        {
            Func<ParameterInfo, object> selector = parameterInfo => typeResolver.Resolve(parameterInfo.ParameterType);

            return parameterInfos.Select(selector);
        }
开发者ID:tylermercier,项目名称:dependency_injection_demo,代码行数:6,代码来源:ParameterInfoListExtension.cs

示例3: Resolve

        public static PersistentClass Resolve(IClass sclass, ITypeResolver typeResolver)
        {
            PersistentClass cls = new PersistentClass ();

            cls.FullyQualifiedName = sclass.FullyQualifiedName;
            cls.Documentation = sclass.Documentation;

            cls.modifiers          = sclass.Modifiers;
            cls.classType          = sclass.ClassType;

            foreach (string t in sclass.BaseTypes)
                cls.baseTypes.Add (typeResolver.Resolve (t));

            foreach (IClass c in sclass.InnerClasses)
                cls.innerClasses.Add (PersistentClass.Resolve (c,typeResolver));

            foreach (IField f in sclass.Fields)
                cls.fields.Add (PersistentField.Resolve (f, typeResolver));

            foreach (IProperty p in sclass.Properties)
                cls.properties.Add (PersistentProperty.Resolve (p, typeResolver));

            foreach (IMethod m in sclass.Methods)
                cls.methods.Add (PersistentMethod.Resolve (m, typeResolver));

            foreach (IEvent e in sclass.Events)
                cls.events.Add (PersistentEvent.Resolve (e, typeResolver));

            foreach (IIndexer i in sclass.Indexer)
                cls.indexer.Add (PersistentIndexer.Resolve (i, typeResolver));

            cls.region = sclass.Region;
            return cls;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:34,代码来源:PersistentClass.cs


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