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)); }
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)); }
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)); }