예제 #1
0
        public static BenchDestination ToBenchDestination(BenchSource from)
        {
            return(new BenchDestination
            {
                i1 = ToInt2(from.i1),
                i2 = ToInt2(from.i2),
                i3 = ToInt2(from.i3),
                i4 = ToInt2(from.i4),
                i5 = ToInt2(from.i5),
                i6 = ToInt2(from.i6),
                i7 = ToInt2(from.i7),
                i8 = ToInt2(from.i8),

                n2 = from.n2,
                n3 = from.n3,
                n4 = from.n4,
                n5 = from.n5,
                n6 = from.n6,
                n7 = from.n7,
                n8 = from.n8,
                n9 = from.n9,

                s1 = from.s1,
                s2 = from.s2,
                s3 = from.s3,
                s4 = from.s4,
                s5 = from.s5,
                s6 = from.s6,
                s7 = from.s7,
            });
        }
예제 #2
0
        public void Does_Convert_BenchSource()
        {
            var from = new BenchSource();
            var to   = from.ConvertTo <BenchDestination>(); //warmup

            to = from.ConvertTo <BenchDestination>();

            using (JsConfig.With(includePublicFields: true))
            {
                to.PrintDump();
                from.PrintDump();
            }
        }
        public void Does_Convert_BenchSource()
        {
            var from = new BenchSource();
            var to = from.ConvertTo<BenchDestination>(); //warmup
            to = from.ConvertTo<BenchDestination>();

            using (JsConfig.With(includePublicFields: true))
            {
                to.PrintDump();
                from.PrintDump();
            }
        }
 public static BenchDestination.Int1 ToInt1(BenchSource.Int1 from)
 {
     return new BenchDestination.Int1 { i = from.i, str1 = from.str1, str2 = from.str2 };
 }
 public static BenchDestination.Int2 ToInt2(BenchSource.Int2 from)
 {
     return new BenchDestination.Int2
     {
         i1 = ToInt1(from.i1),
         i2 = ToInt1(from.i2),
         i3 = ToInt1(from.i3),
         i4 = ToInt1(from.i4),
         i5 = ToInt1(from.i5),
         i6 = ToInt1(from.i6),
         i7 = ToInt1(from.i7),
     };
 }
        public static BenchDestination ToBenchDestination(BenchSource from)
        {
            return new BenchDestination
            {
                i1 = ToInt2(from.i1),
                i2 = ToInt2(from.i2),
                i3 = ToInt2(from.i3),
                i4 = ToInt2(from.i4),
                i5 = ToInt2(from.i5),
                i6 = ToInt2(from.i6),
                i7 = ToInt2(from.i7),
                i8 = ToInt2(from.i8),

                n2 = from.n2,
                n3 = from.n3,
                n4 = from.n4,
                n5 = from.n5,
                n6 = from.n6,
                n7 = from.n7,
                n8 = from.n8,
                n9 = from.n9,

                s1 = from.s1,
                s2 = from.s2,
                s3 = from.s3,
                s4 = from.s4,
                s5 = from.s5,
                s6 = from.s6,
                s7 = from.s7,
            };
        }