Exemplo n.º 1
0
        public OidbSSOPkg(uint cmd, uint type, uint?result, OidbByteBufferWriter writer)
        {
            svcCmd    = cmd;
            svcType   = type;
            svcResult = result;

            root = new ProtoTreeRoot();
            {
                root.AddLeafVar("08", svcCmd);
                root.AddLeafVar("10", svcType);
                root.AddLeafVar("18", svcResult);

                var payload = new ByteBuffer();
                {
                    writer(payload);
                }
                root.AddLeafByteBuffer("22", payload);

                root.AddLeafString("28", errorMsg);
                root.AddLeafString("30", clientVer);
            }
            PutByteBuffer(root.Serialize());
        }