本文整理汇总了C#中ITypeResolver.LoadPropertyType方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeResolver.LoadPropertyType方法的具体用法?C# ITypeResolver.LoadPropertyType怎么用?C# ITypeResolver.LoadPropertyType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeResolver
的用法示例。
在下文中一共展示了ITypeResolver.LoadPropertyType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PropertySpec
protected PropertySpec(ITypeResolver typeResolver,
PropertyInfo propertyInfo,
Func<TypeSpec> reflectedType = null)
: base(typeResolver, propertyInfo)
{
this.reflectedType = CreateLazy(reflectedType ?? (() => typeResolver.LoadReflectedType(this)));
this.declaringType = CreateLazy(() => typeResolver.LoadDeclaringType(this));
this.propertyType = CreateLazy(() => typeResolver.LoadPropertyType(this));
this.propertyFlags = typeResolver.LoadPropertyFlags(this);
this.baseDefinition = CreateLazy(() => typeResolver.LoadBaseDefinition(this));
this.getter = CreateLazy(() => typeResolver.LoadGetter(this));
this.setter = CreateLazy(() => typeResolver.LoadSetter(this));
this.isRequiredForConstructor = CreateLazy(() => ReflectedType.RequiredProperties.Contains(this));
}
示例2: PropertySpec
protected PropertySpec(ITypeResolver typeResolver,
PropertyInfo propertyInfo,
TypeSpec reflectedType)
: base(typeResolver, propertyInfo)
{
if (reflectedType == null)
throw new ArgumentNullException(nameof(reflectedType));
ReflectedType = reflectedType;
this.declaringType = CreateLazy(() => typeResolver.LoadDeclaringType(this));
this.propertyType = CreateLazy(() => typeResolver.LoadPropertyType(this));
Flags = typeResolver.LoadPropertyFlags(this);
this.baseDefinition = CreateLazy(() => typeResolver.LoadBaseDefinition(this));
this.getter = CreateLazy(() => typeResolver.LoadGetter(this));
this.setter = CreateLazy(() => typeResolver.LoadSetter(this));
this.isRequiredForConstructor = CreateLazy(() => ReflectedType.RequiredProperties.Contains(this));
}