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

DeserializeItemsFromByteArray() protected method

This method is used to deserialize the items of the cell knowledge range from the byte array.
protected DeserializeItemsFromByteArray ( byte byteArray, int &currentIndex, int lengthOfItems ) : void
byteArray byte Specify the byte array.
currentIndex int Specify the start index from the byte array.
lengthOfItems int Specify the current length of items in the cell knowledge range.
return void
        protected override void DeserializeItemsFromByteArray(byte[] byteArray, ref int currentIndex, int lengthOfItems)
        {
            int index = currentIndex;

            byte[] temp = new byte[16];
            Array.Copy(byteArray, index, temp, 0, 16);
            this.CellKnowledgeRangeGUID = new Guid(temp);
            index += 16;

            this.From = BasicObject.Parse<Compact64bitInt>(byteArray, ref index);
            this.To = BasicObject.Parse<Compact64bitInt>(byteArray, ref index);

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

            currentIndex = index;
        }