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

DeserializeItemsFromByteArray() protected method

Used to de-serialize the element.
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.ObjectExtendedGUID = BasicObject.Parse<ExGuid>(byteArray, ref index);
            this.ObjectPartitionID = BasicObject.Parse<Compact64bitInt>(byteArray, ref index);
            this.ObjectDataSize = BasicObject.Parse<Compact64bitInt>(byteArray, ref index);
            this.ObjectReferencesCount = BasicObject.Parse<Compact64bitInt>(byteArray, ref index);
            this.CellReferencesCount = BasicObject.Parse<Compact64bitInt>(byteArray, ref index);

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

            currentIndex = index;
        }