예제 #1
0
        private void Fun_Deserialize()
        {
            //StringZ c = null;
            byte[] c = MessagePackSerializer.Serialize(new mStringZ2
            {
                name      = "a",
                health    = 100,
                fff       = 1.124f,
                position1 = new mVector3 {
                    x = 1.123f, y = 2.123f, z = 3.123f
                },
                position2 = new mVector3 {
                    x = 1.123f, y = 2.123f, z = 3.123f
                },
                position3 = new mVector3 {
                    x = 1.123f, y = 2.123f, z = 3.123f
                },
                position4 = new mVector3 {
                    x = 1.123f, y = 2.123f, z = 3.123f
                }
            });

            mStringZ2 _m2 = MessagePackSerializer.Deserialize <mStringZ2>(c);
            mStringZ3 _m3 = MessagePackSerializer.Deserialize <mStringZ3>(c);
            //mStringZ4 _m4 = MessagePackSerializer.Deserialize<mStringZ4>(c);

            mStringZ2 _m = null;

            for (int i = 0; i < Constant.LOOP_MAX; i++)
            {
                _m = MessagePackSerializer.Deserialize <mStringZ2>(c);
            }
            Console.WriteLine(_m);
            //var re = ZeroFormatterSerializer.Convert(c);
        }
예제 #2
0
 private void Fun_Class()
 {
     for (int i = 0; i < Constant.LOOP_MAX; i++)
     {
         mStringZ2 _s2 = new mStringZ2()
         {
             name      = "a",
             health    = 100,
             fff       = 1.124f,
             position1 = new mVector3 {
                 x = 1.123f, y = 2.123f, z = 3.123f
             },
             position2 = new mVector3 {
                 x = 1.123f, y = 2.123f, z = 3.123f
             },
             position3 = new mVector3 {
                 x = 1.123f, y = 2.123f, z = 3.123f
             },
             position4 = new mVector3 {
                 x = 1.123f, y = 2.123f, z = 3.123f
             }
         };
     }
 }