Microsoft.Protocols.TestSuites.MS_OXORULE.PropertyRestriction.Deserialize C# (CSharp) Method

Deserialize() public method

Deserialized byte array to a Restriction instance
public Deserialize ( byte buffer ) : uint
buffer byte Byte array contain data of a Restriction instance.
return uint
        public override uint Deserialize(byte[] buffer)
        {
            BufferReader reader = new BufferReader(buffer);
            this.RestrictType = (RestrictionType)reader.ReadByte();
            this.RelOp = (RelationalOperator)reader.ReadByte();
            this.propTag.PropertyType = reader.ReadUInt16();
            this.propTag.PropertyId = reader.ReadUInt16();

            uint size = reader.Position;
            byte[] tmpArray = reader.ReadToEnd();
            this.TaggedValue = AdapterHelper.ReadTaggedProperty(tmpArray);
            size += (uint)this.TaggedValue.Size();

            return size;
        }
    }