Exemplo n.º 1
0
 public void Deserialize(ref ReadOnlySpan <byte> buffer)
 {
     SessionId ??= new SessionId();
     SessionId.Deserialize(ref buffer);
     FieldId    = BinSerialize.ReadPackedUnsignedInteger(ref buffer);
     StartIndex = BinSerialize.ReadPackedUnsignedInteger(ref buffer);
     Take       = BinSerialize.ReadPackedUnsignedInteger(ref buffer);
 }
Exemplo n.º 2
0
        public void Deserialize(ref ReadOnlySpan <byte> buffer)
        {
            SessionId ??= new SessionId();
            SessionId.Deserialize(ref buffer);
            Counter = BinSerialize.ReadPackedUnsignedInteger(ref buffer);
            Flags   = (Pv2StreamFlags)BinSerialize.ReadByte(ref buffer);
            var count = BinSerialize.ReadByte(ref buffer);

            Groups = new List <ushort>(count);
            for (var i = 0; i < count; i++)
            {
                Groups.Add(BinSerialize.ReadUShort(ref buffer));
            }
        }