Beispiel #1
0
        public override int GetDataSize(object data)
        {
            int s;

            byte[]     array  = new byte[4];
            BytePacker packer = new BytePacker(array);

            VarintBitConverter.SerializeUShort((ushort)data, packer, out s);
            return(s);
        }
Beispiel #2
0
        public override void Serialize(BytePacker packer, object data)
        {
            int s;

            VarintBitConverter.SerializeUShort((ushort)data, packer, out s);
        }