Esempio n. 1
0
        public unsafe void WriteObject(BinSerializer bs)
        {
            bs.Write(WaitHandle.ToInt64());
            bs.Write(RaftGroupId);
            bs.Write(DataCF);
            bs.Write(KeySize);
            var span = new ReadOnlySpan <byte>(KeyPtr.ToPointer(), (int)KeySize);

            bs.Stream.Write(span);
        }
Esempio n. 2
0
        public unsafe void ReadObject(BinSerializer bs)
        {
            WaitHandle  = new IntPtr(bs.ReadInt64());
            RaftGroupId = bs.ReadUInt64();
            DataCF      = bs.ReadInt32();
            KeySize     = bs.ReadUInt32();
            KeyPtr      = Marshal.AllocHGlobal((int)KeySize);
            var span = new Span <byte>(KeyPtr.ToPointer(), (int)KeySize);

            bs.Stream.Read(span);
        }