public GeneratorOptions <T> For <TProperty>( Expression <Func <T, TProperty> > propertyExpression, TProperty seed, Func <TProperty, TProperty> valueFunc) { var generator = new FuncGenerator <TProperty>(seed, valueFunc); AddConvention(propertyExpression, () => generator.GetRandomValue()); return(this); }
public GeneratorOptions <T> AppendCounter(Expression <Func <T, string> > propertyExpression, Func <string> prefix) { var generator = new FuncGenerator <long, string>(0, val => ++ val, val => val.ToString()); return(For(propertyExpression, () => prefix() + generator.GetRandomValue())); }