private StaticMethodWrapper GetDiscriminatorMethod(StaticPropertyWrapper property) { if (GetMethod != null) { return(property.GetMethod); } if (SetMethod != null) { return(property.SetMethod); } return(null); }
/// <summary> /// Gets the attributes of a property. /// </summary> /// <param name="property">The property, not null.</param> /// <returns>The property attributes.</returns> protected internal abstract PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property);
protected override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property) { IProperty propertyHandle = (IProperty)property.Handle; if (!propertyHandle.IsValid()) return null; #if RESHARPER_31 IAccessor accessorHandle = propertyHandle.Setter(false); #else IAccessor accessorHandle = propertyHandle.Setter; #endif return accessorHandle != null && accessorHandle.IsValid() ? WrapAccessor(accessorHandle, property) : null; }
protected override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property) { IProperty propertyHandle = (IProperty)property.Handle; return MakeType(propertyHandle.Type); }
protected override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property) { // Note: There don't seem to be any usable property attributes. return 0; }
/// <summary> /// Gets the set method of a property, or null if none. /// </summary> /// <param name="property">The property, not null.</param> /// <returns>The set method, or null if none.</returns> protected internal abstract StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property);
/// <summary> /// Gets the property type. /// </summary> /// <param name="property">The property, not null.</param> /// <returns>The property type.</returns> protected internal abstract StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property);
protected internal override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property) { PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle; return WrapAccessor(propertyHandle.SetMethod, property); }
protected internal override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property) { PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle; return(WrapAccessor(propertyHandle.SetMethod, property)); }
protected internal override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property) { PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle; return(MakeType(propertyHandle.PropertyType)); }
protected internal override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property) { PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle; return((PropertyAttributes)propertyHandle.Attributes); }
private StaticMethodWrapper GetDiscriminatorMethod(StaticPropertyWrapper property) { if (GetMethod != null) return property.GetMethod; if (SetMethod != null) return property.SetMethod; return null; }
protected internal override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property) { PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle; return MakeType(propertyHandle.PropertyType); }
protected internal override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property) { PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle; return (PropertyAttributes)propertyHandle.Attributes; }