Exemple #1
0
 public void PushNative(object value)
 {
     byte[] datas = NativeFormatter.SerializeToBinary(value);
     this.PushInt(datas.Length);
     Buffer.BlockCopy(buffer, 0, this.buffer, this.offset, datas.Length);
     this.offset += datas.Length;
 }
Exemple #2
0
        public object Native()
        {
            int length = this.Int();

            byte[] datas = new byte[length];
            Buffer.BlockCopy(this.buffer, this.offset, datas, 0, length);
            this.offset += length;
            return(NativeFormatter.DeserializeWithBinary(datas));
        }