private static void WithFor(List <UserModel> source) { if (source.Count > 1) { RunCases.Execute(() => User.CreateWithFor(source), "Create Method - For", source.Count); } }
private static void WithParallelForeach(List <UserModel> source) { if (source.Count > 1) { RunCases.Execute(() => User.CreateWithParallelForeach(source), "Create Method - Parallel Foreach", source.Count); } }
private static void WithParallelForeach(List <UserModel> source) { if (source.Count > 1) { RunCases.Execute(() => source.MapperWithParallelForeach(), "ExtensionMethod - Parallel Foreach", source.Count); } }
private static void WithFor(List <UserModel> source) { if (source.Count > 1) { RunCases.Execute(() => source.MapperWithFor(), "ExtensionMethod - For", source.Count); } }
private static void WithLambda(List <UserModel> source) { if (source.Count == 1) { RunCases.Execute(() => User.Create(source.First()), "Create Method - Lambda", source.Count); } else { RunCases.Execute(() => User.CreateWithLambda(source), "Create Method - Lambda", source.Count); } }
private static void WithLambda(List <UserModel> source) { if (source.Count == 1) { RunCases.Execute(() => source.First().Mapper(), "ExtensionMethod - Lambda", source.Count); } else { RunCases.Execute(() => source.Mapper(), "ExtensionMethod - Lambda", source.Count); } }
public static void WithMapper <TSource, TDestiny>(Mapper mapper, TSource source, int quantity) => RunCases.Execute(() => mapper.Map <TDestiny>(source), "AutoMapper", quantity);