public static IConfigureAction ForType <T>(this IConfigureConventions conventions, bool mustBeProperty = false) { return(conventions.If(d => d.Type.Is <T>() && (!mustBeProperty?true:MemberRestriction(d, mustBeProperty)))); }
public static IConfigureAction ForModelWithAttribute <T>(this IConfigureConventions conventions) where T : Attribute { return(conventions.If(d => d.PropertyOrParentHasAttribute <T>())); }
public static IConfigureAction IfNotCustomType(this IConfigureConventions conventions, bool onlyPrimitives = false) { return(conventions.If(d => !d.Type.IsUserDefinedClass() || (onlyPrimitives || d.HasAttribute <AsOneElementAttribute>()))); }
public static IConfigureAction PropertiesExcept(this IConfigureConventions conventions, Func <PropertyInfo, bool> exceptCriteria) { return(conventions.If(model => !model.IsRootModel && exceptCriteria(model.PropertyDefinition))); }
public static IConfigureAction PropertiesOnly(this IConfigureConventions conventions) { return(conventions.If(d => !d.IsRootModel)); }
public static IConfigureAction IfDerivesFrom <T>(this IConfigureConventions conventions, bool mustBeProperty = false) { return(conventions.If(d => d.Type.DerivesFrom <T>() && !mustBeProperty?true:MemberRestriction(d, mustBeProperty))); }
public static IConfigureAction Unless(this IConfigureConventions conventions, Predicate <ModelInfo> predicate) { return(conventions.If(d => !predicate(d))); }