public static ConventionBase <IType, List <IMethod> > Properties(this ConventionBuilder <IType, List <IMethod> > source, string namePrefix, Func <IProperty, bool> propertyFilter) => source.By(t => t .Properties .Where(propertyFilter) .Select(m => new PropertyAsMethod(m, namePrefix) as IMethod) .ToList() );
public static ConventionBase <IType, List <IProperty> > Methods(this ConventionBuilder <IType, List <IProperty> > source, string ignorePrefix, Func <IMethod, bool> filter) => source.By(t => t .Methods .Where(filter) .Select(m => new MethodAsProperty(m, ignorePrefix) as IProperty) .ToList() );
public static ConventionBase <IType, IIdExtractor> IdByMethod( this ConventionBuilder <IType, IIdExtractor> source, Func <IMethod, bool> filter, Func <PropertyValueExtractor, PropertyValueExtractor> configurationDelegate ) => source.By(t => configurationDelegate(BuildRoutine.IdExtractor() .ByPropertyValue(new MethodAsProperty( t.Methods.First(filter.And(o => o.HasNoParameters() && !o.ReturnsVoid())) )) )).When(t => t.Methods.Any(filter.And(o => o.HasNoParameters() && !o.ReturnsVoid()))) as DelegateBasedConvention <IType, IIdExtractor>;
public static ConventionBase <IType, List <IProperty> > Properties(this ConventionBuilder <IType, List <IProperty> > source, Func <IProperty, bool> filter) => source.By(t => t.Properties.Where(filter).ToList());
public static ConventionBase <IType, List <IConstructor> > Constructors(this ConventionBuilder <IType, List <IConstructor> > source, Func <IConstructor, bool> filter) => source.By(t => t.Constructors.Where(filter).ToList());
public static ConventionBase <IType, List <IMethod> > Build(this ConventionBuilder <IType, List <IMethod> > source, Func <MethodBuilder, IMethod> builder ) => source.By(t => new List <IMethod> { builder(BuildRoutine.Method(t)) });
public static ConventionBase <IType, List <IMethod> > Build(this ConventionBuilder <IType, List <IMethod> > source, Func <MethodBuilder, IEnumerable <IMethod> > builder ) => source.By(t => builder(BuildRoutine.Method(t)).ToList());
public static ConventionBase <IType, IValueExtractor> ValueByProperty( this ConventionBuilder <IType, IValueExtractor> source, Func <IProperty, bool> filter, Func <PropertyValueExtractor, PropertyValueExtractor> configurationDelegate ) => source .By(t => configurationDelegate(BuildRoutine.ValueExtractor().ByPropertyValue(t.Properties.First(filter)))) .When(t => t.Properties.Any(filter));
public static ConventionBase <TFrom, List <TResultItem> > By <TFrom, TResultItem>( this ConventionBuilder <TFrom, List <TResultItem> > source, Func <TFrom, TResultItem> converterDelegate ) => source.By(o => new List <TResultItem> { converterDelegate(o) });
public static ConventionBase <IType, List <IMethod> > Methods(this ConventionBuilder <IType, List <IMethod> > source, Func <IMethod, bool> filter) => source.By(t => t.Methods.Where(filter).ToList());