コード例 #1
0
 private TestStruct1 FromTestSchema(SerializationTests.TestStruct1 testStruct1)
 {
     return(new TestStruct1()
     {
         IntProp = testStruct1.IntProp,
         ByteProp = testStruct1.ByteProp,
         ShortProp = testStruct1.ShortProp
     });
 }
コード例 #2
0
        public TestStruct1 ReadTestStruct1(byte[] buffer)
        {
            var test = new SerializationTests.TestStruct1();
            var bb   = new ByteBuffer(buffer);

            test.__init(0, bb);
            var result = new TestStruct1()
            {
                IntProp   = test.IntProp,
                ByteProp  = test.ByteProp,
                ShortProp = test.ShortProp
            };

            return(result);
        }