Microsoft.Protocols.TestSuites.Common.RopSynchronizationImportHierarchyChangeRequest.Size C# (CSharp) Method

Size() public method

Return the size of RopSynchronizationImportHierarchyChange request buffer structure.
public Size ( ) : int
return int
        public int Size()
        {
            // 7 indicates sizeof (byte) * 3 + sizeof (UInt16) * 2
            int size = sizeof(byte) * 7;
            for (int i = 0; i < this.HierarchyValueCount; i++)
            {
                if (this.HierarchyValues[i].Value != null)
                {
                    size += this.HierarchyValues[i].Size();
                }
            }

            for (int i = 0; i < this.PropertyValueCount; i++)
            {
                if (this.PropertyValues[i].Value != null)
                {
                    size += this.PropertyValues[i].Size();
                }
            }

            return size;
        }
    }
RopSynchronizationImportHierarchyChangeRequest