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 bool Equals(object obj) { VirtualPropertyBase other = obj as VirtualPropertyBase; if (other == null) { return(false); } // We don't need to compare the getters and setters. // But do we need to compare the contexts and return types? return (_name == other._name && _declaringType.Equals(other._declaringType) && _propertyType == other._propertyType && CollectionServices.CompareArrays(GetIndexParametersNoCopy(), other.GetIndexParametersNoCopy())); }
protected FuncPropertyAccessorBase(VirtualPropertyBase declaringProperty) { Debug.Assert(null != declaringProperty); DeclaringProperty = declaringProperty; }
protected PropertyGetterBase(VirtualPropertyBase property) : base(property) { }
protected FuncPropertyAccessorBase(VirtualPropertyBase declaringProperty) { Contract.Requires(null != declaringProperty); _declaringProperty = declaringProperty; }