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

DeserializeItemsFromByteArray() protected method

This method is used to deserialize the items of the content tag knowledge 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 content tag knowledge.
return void
        protected override void DeserializeItemsFromByteArray(byte[] byteArray, ref int currentIndex, int lengthOfItems)
        {
            if (lengthOfItems != 0)
            {
                throw new KnowledgeParseErrorException(currentIndex, "ContentTagKnowledge object over-parse error", null);
            }

            int index = currentIndex;

            this.ContentTagEntryArray = new List<ContentTagKnowledgeEntry>();
            ContentTagKnowledgeEntry outValue;
            while (StreamObject.TryGetCurrent<ContentTagKnowledgeEntry>(byteArray, ref index, out outValue))
            {
                this.ContentTagEntryArray.Add(outValue);
            }

            currentIndex = index;
        }