public VirtualPropertyInfo( string name, Type propertyType, Func <object, object> getter, Action <object, object> setter, IEnumerable <Attribute> propertyAttributes, IEnumerable <Attribute> getterAttributes, IEnumerable <Attribute> setterAttributes, CustomReflectionContext context) : base(propertyType, name, context) { if (getter == null && setter == null) { throw new ArgumentException(SR.ArgumentNull_GetterOrSetterMustBeSpecified); } CustomType rcType = propertyType as CustomType; if (rcType == null || rcType.ReflectionContext != context) { throw new ArgumentException(SR.Argument_PropertyTypeFromDifferentContext); } if (getter != null) { _getter = new PropertyGetter(this, getter, getterAttributes); } if (setter != null) { _setter = new PropertySetter(this, setter, setterAttributes); } _attributes = propertyAttributes ?? CollectionServices.Empty <Attribute>(); }
public PropertyGetter(VirtualPropertyBase property, Func <object, object> getter, IEnumerable <Attribute> getterAttributes) : base(property) { Debug.Assert(null != getter); _getter = getter; _attributes = getterAttributes ?? CollectionServices.Empty <Attribute>(); }
public PropertySetter(VirtualPropertyBase property, Action <object, object> setter, IEnumerable <Attribute> setterAttributes) : base(property) { Debug.Assert(null != setter); _setter = setter; _valueParameter = new VirtualParameter(this, property.PropertyType, "value", 0); _attributes = setterAttributes ?? CollectionServices.Empty <Attribute>(); }
public override IList <CustomAttributeData> GetCustomAttributesData() { return(CollectionServices.Empty <CustomAttributeData>()); }
public override ParameterInfo[] GetParameters() { return(CollectionServices.Empty <ParameterInfo>()); }
public override sealed Type[] GetGenericArguments() { return(CollectionServices.Empty <Type>()); }
public override object[] GetCustomAttributes(bool inherit) { return(CollectionServices.Empty <object>()); }
public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return(CollectionServices.Empty <Attribute>()); }
public override sealed Type[] GetRequiredCustomModifiers() { return(CollectionServices.Empty <Type>()); }
protected override Type[] GetParameterTypes() { return(CollectionServices.Empty <Type>()); }