Exemplo n.º 1
0
        public void Deserialize(ref ReadOnlySpan <byte> buffer)
        {
            var type = (Pv2ParamTypeEnum)BinSerialize.ReadPackedUnsignedInteger(ref buffer);

            Value = Pv2ParamInterface.CreateValue(type);
            Value.Deserialize(ref buffer);
        }
Exemplo n.º 2
0
        public void Deserialize(ref ReadOnlySpan <byte> buffer)
        {
            Index = BinSerialize.ReadPackedUnsignedInteger(ref buffer);
            var typeEnum = (Pv2ParamTypeEnum)BinSerialize.ReadPackedUnsignedInteger(ref buffer);

            Type = Pv2ParamInterface.CreateType(typeEnum);
            var isContainValue = BinSerialize.ReadBool(ref buffer);

            Type.Deserialize(ref buffer);
            Value = null;
            if (!isContainValue)
            {
                return;
            }
            Value = Pv2ParamInterface.CreateValue(typeEnum);
            Value.Deserialize(ref buffer);
        }
Exemplo n.º 3
0
 public override void CopyFrom(Pv2ParamValue data)
 {
     RawValue = Pv2ParamInterface.CheckValueTypeAndCast <Pv2BoolParamValue>(data).RawValue;
 }