Microsoft.Protocols.TestSuites.MS_OXORULE.AddressBookPropValueList.Parse C# (CSharp) Method

Parse() public static method

Parse the AddressBookPropValueList structure.
public static Parse ( byte rawData, int &index ) : AddressBookPropValueList
rawData byte The raw data of response buffer.
index int The start index.
return AddressBookPropValueList
        public static AddressBookPropValueList Parse(byte[] rawData, ref int index)
        {
            AddressBookPropValueList addressBookPropValueList = new AddressBookPropValueList();
            addressBookPropValueList.PropertyValueCount = BitConverter.ToUInt32(rawData, index);
            index += sizeof(uint);
            Context.Instance.PropertyBytes = rawData;
            Context.Instance.CurIndex = index;
            Context.Instance.CurProperty = new Property(Microsoft.Protocols.TestSuites.Common.PropertyType.PtypUnspecified);

            addressBookPropValueList.PropertyValues = new AddressBookTaggedPropertyValue[addressBookPropValueList.PropertyValueCount];
            for (int i = 0; i < addressBookPropValueList.PropertyValueCount; i++)
            {
                // Parse the TaggedPropertyValue from the response buffer.
                AddressBookTaggedPropertyValue taggedPropertyValue = new AddressBookTaggedPropertyValue();
                taggedPropertyValue.Parse(Context.Instance);
                addressBookPropValueList.PropertyValues[i] = taggedPropertyValue;
            }

            index = Context.Instance.CurIndex;

            return addressBookPropValueList;
        }
    }
AddressBookPropValueList