Microsoft.Protocols.TestSuites.SharedAdapter.StorageIndexDataElementData.SerializeToByteList C# (CSharp) Method

SerializeToByteList() public method

Used to convert the element into a byte List.
public SerializeToByteList ( ) : List
return List
        public override List<byte> SerializeToByteList()
        {
            List<byte> byteList = new List<byte>();

            if (this.StorageIndexManifestMapping != null)
            {
                byteList.AddRange(this.StorageIndexManifestMapping.SerializeToByteList());
            }
            
            if (this.StorageIndexCellMappingList != null)
            {
                foreach (StorageIndexCellMapping cellMapping in this.StorageIndexCellMappingList)
                {
                    byteList.AddRange(cellMapping.SerializeToByteList());
                }
            }

            // Storage Index Revision Mapping 
            if (this.StorageIndexRevisionMappingList != null)
            {
                foreach (StorageIndexRevisionMapping revisionMapping in this.StorageIndexRevisionMappingList)
                {
                    byteList.AddRange(revisionMapping.SerializeToByteList());
                }
            }

            return byteList;
        }