/// <summary>
        /// Initializes a new instance of the FolderReplicaInfo structure.
        /// </summary>
        /// <param name="stream">A FastTransferStream.</param>
        public FolderReplicaInfo(FastTransferStream stream)
        {
            this.Flags = stream.ReadUInt32();
            this.Depth = stream.ReadUInt32();
            this.FolderLongTermId = new LongTermId
            {
                DatabaseGuid = stream.ReadGuid().ToByteArray(),
                GlobalCounter = new byte[6]
            };
            stream.Read(
                this.FolderLongTermId.GlobalCounter,
                0,
                this.FolderLongTermId.GlobalCounter.Length);
            stream.Read(new byte[2], 0, 2);
            this.ServerDNCount = stream.ReadUInt32();
            this.CheapServerDNCount = stream.ReadUInt32();
            this.ServerDNArray = new string[this.ServerDNCount];

            for (int i = 0; i < this.ServerDNCount; i++)
            {
                this.ServerDNArray[i] = stream.ReadString8();
            }
        }
        /// <summary>
        /// Initializes a new instance of the FolderReplicaInfo structure.
        /// </summary>
        /// <param name="stream">A FastTransferStream.</param>
        public FolderReplicaInfo(FastTransferStream stream)
        {
            this.Flags            = stream.ReadUInt32();
            this.Depth            = stream.ReadUInt32();
            this.FolderLongTermId = new LongTermId
            {
                DatabaseGuid  = stream.ReadGuid().ToByteArray(),
                GlobalCounter = new byte[6]
            };
            stream.Read(
                this.FolderLongTermId.GlobalCounter,
                0,
                this.FolderLongTermId.GlobalCounter.Length);
            stream.Read(new byte[2], 0, 2);
            this.ServerDNCount      = stream.ReadUInt32();
            this.CheapServerDNCount = stream.ReadUInt32();
            this.ServerDNArray      = new string[this.ServerDNCount];

            for (int i = 0; i < this.ServerDNCount; i++)
            {
                this.ServerDNArray[i] = stream.ReadString8();
            }
        }
 /// <summary>
 /// Deserialize next object from a FastTransferStream.
 /// </summary>
 /// <param name="stream">A FastTransferStream.</param>
 public override void ConsumeNext(FastTransferStream stream)
 {
     base.ConsumeNext(stream);
     byte[] buffer = new byte[Guid.Empty.ToByteArray().Length];
     stream.Read(buffer, 0, buffer.Length);
     this.propertySet = new Guid(buffer);
     int tmp = stream.ReadByte();
     if (tmp == -1)
     {
         AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully.");
     }
     else if (tmp > 0)
     {
         this.flag = (byte)tmp;
     }
 }
        /// <summary>
        /// Deserialize next object from a FastTransferStream.
        /// </summary>
        /// <param name="stream">A FastTransferStream.</param>
        public override void ConsumeNext(FastTransferStream stream)
        {
            base.ConsumeNext(stream);
            byte[] buffer = new byte[Guid.Empty.ToByteArray().Length];
            stream.Read(buffer, 0, buffer.Length);
            this.propertySet = new Guid(buffer);
            int tmp = stream.ReadByte();

            if (tmp == -1)
            {
                AdapterHelper.Site.Assert.Fail("The stream cannot be deserialized successfully.");
            }
            else if (tmp > 0)
            {
                this.flag = (byte)tmp;
            }
        }