Exemplo n.º 1
0
        public void Benchmark_Serialize_PersonClass()
        {
            var data = new APerson {
                FirstName = "Dima", LastName = "Sokolov", Age = 16, DOB = DateTime.Now
            };

            serializeBenchmark("PersonClass", data);
        }
Exemplo n.º 2
0
        public void Benchmark_Serialize_ListObjects()
        {
            var p1 = new APerson {
                FirstName = "Dima", LastName = "Sokolov", Age = 16, DOB = DateTime.Now
            };
            var p2 = new APerson {
                FirstName = "Fima", LastName = "Orloff", Age = 23, DOB = DateTime.Now
            };
            var p3 = new APerson {
                FirstName = "Dodik", LastName = "Stevenson", Age = 99, DOB = DateTime.Now
            };
            var data = new List <object> {
                1, true, p1, 12.34, p2, "yes!", p3, DateTime.Now, 'a'
            };

            serializeBenchmark("ListObjects", data);
        }