Esempio n. 1
0
 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));
 }