public static IPostprocessComposer <T> FromFactory <T>(this IFactoryComposer <T> composer, Func <Random, T> factory) { return(composer.FromFactory <int>(value => { using (var random = new PooledRandom(value)) { return factory(random); } })); }
public static IPostprocessComposer <T> FromNumberGenerator <T>(this IFactoryComposer <T> composer, Func <DbaseFieldNumberGenerator, T> factory) { return(composer.FromFactory <int>(value => { using (var random = new PooledRandom(value)) { return factory(new DbaseFieldNumberGenerator(random)); } })); }
FromFactory <T>(this IFactoryComposer <T> composer, Func <Random, T> factory) => composer.FromFactory <int>(value => factory(new Random(value)));
public static IPostprocessComposer <T> FromFactory <T>(this IFactoryComposer <T> composer, Func <Random, T> factory) => composer.FromFactory <int>(value => factory(new Random(value)));
private ISpecimenBuilder FromFactory <T>(IFactoryComposer <T> c) => c.FromFactory(new MethodInvoker(new PrivateGreedyConstructorQuery()));