Deserialize() публичный Метод

Deserialize fields in this class from a stream.
public Deserialize ( Stream stream, int size ) : int
stream Stream stream contains a serialized instance of this class
size int The number of bytes can read if -1, no limitation, MUST be -1
Результат int
Пример #1
0
        /// <summary>
        /// Get AuxBlock list.
        /// </summary>
        /// <returns>A list contains AuxBlocks.</returns>
        public List <AuxBlock> GetAuxBlockList()
        {
            List <AuxBlock> auxBlocks = null;

            if (this.auxBytes != null)
            {
                auxBlocks = new List <AuxBlock>();
                using (MemoryStream stream = new MemoryStream(this.auxBytes, false))
                {
                    stream.Position = 0;
                    while (stream.Position < stream.Length)
                    {
                        AuxBlock block = new AuxBlock();
                        block.Deserialize(stream, -1);
                        auxBlocks.Add(block);
                    }
                }
            }

            return(auxBlocks);
        }
        /// <summary>
        /// Get AuxBlock list.
        /// </summary>
        /// <returns>A list contains AuxBlocks.</returns>
        public List<AuxBlock> GetAuxBlockList()
        {
            List<AuxBlock> auxBlocks = null;
            if (this.auxBytes != null)
            {
                auxBlocks = new List<AuxBlock>();
                using (MemoryStream stream = new MemoryStream(this.auxBytes, false))
                {
                    stream.Position = 0;
                    while (stream.Position < stream.Length)
                    {
                        AuxBlock block = new AuxBlock();
                        block.Deserialize(stream, -1);
                        auxBlocks.Add(block);
                    }
                }
            }

            return auxBlocks;
        }