// PUBLIC METHODS /////////////////////////////////////////////////// #region Extension Methods public static IAttributeInfoBuilder Attribute <TComplex, TProperty>(this IComplexTypeBuilder <TComplex> complexTypeBuilder, Expression <Func <TComplex, TProperty> > clrPropertySelector) { Contract.Requires(complexTypeBuilder != null); Contract.Requires(clrPropertySelector != null); var clrPropertyType = typeof(TProperty); var clrPropertyName = StaticReflection.GetMemberName(clrPropertySelector); return(complexTypeBuilder.Attribute(clrPropertyName, clrPropertyType)); }
private static void AttributePropertyDiscovered(IComplexTypeBuilder complexTypeConfiguration, PropertyInfo attributeProperty) { Contract.Requires(complexTypeConfiguration != null); Contract.Requires(attributeProperty != null); var clrPropertyName = attributeProperty.Name; var clrPropertyType = attributeProperty.PropertyType; complexTypeConfiguration.Attribute(clrPropertyName, clrPropertyType); }