Exemple #1
0
        public static void Test_ZValue_01()
        {
            Test_ZValue_Class_01 zvalue = new Test_ZValue_Class_01 {
                value1 = new ZString("toto"), value2 = new ZStringArray(new string[] { "toto", "tata", "tutu", "titi" }), value3 = new ZInt(123)
            };

            Trace.WriteLine("zvalue value1 {0} value2 {1} value3 {2}", zvalue.value1, zvalue.value2, zvalue.value3);
            BsonDocument document = zvalue.ToBsonDocument();

            Trace.WriteLine("zvalue.ToBsonDocument {0}", document.ToJson());
            Test_ZValue_Class_01 zvalue2 = BsonSerializer.Deserialize <Test_ZValue_Class_01>(document);

            Trace.WriteLine("zvalue2 value1 {0} value2 {1} value3 {2}", zvalue2.value1, zvalue2.value2, zvalue2.value3);
        }
Exemple #2
0
 public static void Test_ZValue_01()
 {
     Test_ZValue_Class_01 zvalue = new Test_ZValue_Class_01 { value1 = new ZString("toto"), value2 = new ZStringArray(new string[] { "toto", "tata", "tutu", "titi" }), value3 = new ZInt(123) };
     Trace.WriteLine("zvalue value1 {0} value2 {1} value3 {2}", zvalue.value1, zvalue.value2, zvalue.value3);
     BsonDocument document = zvalue.ToBsonDocument();
     Trace.WriteLine("zvalue.ToBsonDocument {0}", document.ToJson());
     Test_ZValue_Class_01 zvalue2 = BsonSerializer.Deserialize<Test_ZValue_Class_01>(document);
     Trace.WriteLine("zvalue2 value1 {0} value2 {1} value3 {2}", zvalue2.value1, zvalue2.value2, zvalue2.value3);
 }