public static DescribeForms ForModel <TModel>(this DescribeForms describe, Action <DescribeForModel <TModel> > action) { var dfm = new DescribeForModel <TModel>(describe); action.Invoke(dfm); return(describe); }
public void Describe(DescribeForms forms) { // Describe some standard value types //forms.ForValue<String>() // .Map(s => new StringField(s)).Unmap(f => f.Value); }
public void Describe(DescribeForms context) { context.ForModel<SpecialOffer>( f => { // Suppress start/end dates f.ForField(m => m.StartDate).Suppress(); f.ForField(m => m.EndDate).Suppress(); // f.AddField("AppliesOn", // m => new DateRange(m.StartDate, m.EndDate), // on=>on.Meta("Date range during which the offer takes effect")); }); }
public DescribeForModel(DescribeForms inner) : base(inner) { }
public DescribeModel(DescribeForms inner) { InnerDescribe = inner; }
public DescribeForModelType(DescribeForms describe, Func<Type, bool> predicate) : base(describe) { this.predicate = predicate; }
public DescribeForModelWhere(DescribeForms describe, Func <TModel, bool> predicate) : base(describe) { this.predicate = predicate; }
public static DescribeForModelWhere <TModel> ForModelWhere <TModel>(this DescribeForms describe, Func <TModel, bool> predicate) { return(new DescribeForModelWhere <TModel>(describe, predicate)); }
public static DescribeForModelType ForModelWhereType(this DescribeForms describe, Func <Type, bool> predicate) { return(new DescribeForModelType(describe, predicate)); }
public static DescribeForModel <TModel> ForModel <TModel>(this DescribeForms describe) { return(new DescribeForModel <TModel>(describe)); }
public DescribeForModelType(DescribeForms describe, Func <Type, bool> predicate) : base(describe) { this.predicate = predicate; }
public void Describe(DescribeForms context) { context.ForField("Id").Suppress(); }