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);
     }
 }
Esempio n. 3
0
 private static void WithParallelForeach(List <UserModel> source)
 {
     if (source.Count > 1)
     {
         RunCases.Execute(() => source.MapperWithParallelForeach(), "ExtensionMethod - Parallel Foreach", source.Count);
     }
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 6
0
 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);
     }
 }
Esempio n. 7
0
 public static void WithMapper <TSource, TDestiny>(Mapper mapper, TSource source, int quantity) =>
 RunCases.Execute(() => mapper.Map <TDestiny>(source), "AutoMapper", quantity);