예제 #1
0
 int ProcChange()
 {
     demo.Module1.Value v = demo.App.Instance.demo_Module1.Table1.GetOrAdd(56);
     v.Int1       = 1;
     bytesInTrans = ByteBuffer.Allocate();
     v.Encode(bytesInTrans);
     return(Procedure.Success);
 }
예제 #2
0
        public void TestEncode()
        {
            demo.Module1.Value e  = new demo.Module1.Value();
            ByteBuffer         bb = ByteBuffer.Allocate();

            e.Encode(bb);

            demo.Module1.Value d = new demo.Module1.Value();
            d.Decode(bb);

            Assert.AreEqual(bb.ReadIndex, bb.WriteIndex);
            Assert.AreEqual(e.ToString(), d.ToString());
        }