本文整理汇总了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;
}
示例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);
}
示例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;
}