Microsoft.Protocols.TestSuites.SharedAdapter.StorageIndexRevisionMapping.DeserializeItemsFromByteArray C# (CSharp) Method

DeserializeItemsFromByteArray() protected method

Used to de-serialize the items
protected DeserializeItemsFromByteArray ( byte byteArray, int &currentIndex, int lengthOfItems ) : void
byteArray byte A Byte array
currentIndex int Start position
lengthOfItems int The length of the items
return void
        protected override void DeserializeItemsFromByteArray(byte[] byteArray, ref int currentIndex, int lengthOfItems)
        {
            int index = currentIndex;
            this.RevisionExtendedGUID = BasicObject.Parse<ExGuid>(byteArray, ref index);
            this.RevisionMappingExtendedGUID = BasicObject.Parse<ExGuid>(byteArray, ref index);
            this.RevisionMappingSerialNumber = BasicObject.Parse<SerialNumber>(byteArray, ref index);

            if (index - currentIndex != lengthOfItems)
            {
                throw new StreamObjectParseErrorException(currentIndex, "StorageIndexRevisionMapping", "Stream object over-parse error", null);
            }

            currentIndex = index;
        }