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

Deserialize() public method

Deserialized byte array to a TagActionData instance
public Deserialize ( byte buffer ) : uint
buffer byte Byte array contains data of an ActionData instance.
return uint
        public uint Deserialize(byte[] buffer)
        {
            BufferReader bufferReader = new BufferReader(buffer);
            PropertyTag propertyTag = new PropertyTag
            {
                PropertyType = bufferReader.ReadUInt16(),
                PropertyId = bufferReader.ReadUInt16()
            };
            this.PropertyTag = propertyTag;
            uint size = bufferReader.Position;
            this.PropertyValue = AdapterHelper.ReadValueByType(this.PropertyTag.PropertyType, bufferReader.ReadToEnd());
            size += (uint)this.PropertyValue.Length;
            return size;
        }
    }