Section 2.2.3.2 Response Error
Inheritance: BaseStructure
        /// <summary>
        /// Parse the ResponseError structure.
        /// </summary>
        /// <param name="s">An stream containing ResponseError structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            this.ErrorStart = new bit32StreamObjectHeaderStart();
            this.ErrorStart.Parse(s);
            this.ErrorTypeGUID = ReadGuid();
            if (this.ErrorTypeGUID.ToString().ToUpper() == "5A66A756-87CE-4290-A38B-C61C5BA05A67")
            {
                this.ErrorData = new CellError();
                ((CellError)this.ErrorData).Parse(s);
            }
            else if (this.ErrorTypeGUID.ToString().ToUpper() == "7AFEAEBF-033D-4828-9C31-3977AFE58249")
            {
                this.ErrorData = new ProtocolError();
                ((ProtocolError)this.ErrorData).Parse(s);
            }
            else if (this.ErrorTypeGUID.ToString().ToUpper() == "32C39011-6E39-46C4-AB78-DB41929D679E")
            {
                this.ErrorData = new Win32Error();
                ((Win32Error)this.ErrorData).Parse(s);
            }
            else if (this.ErrorTypeGUID.ToString().ToUpper() == "8454C8F2-E401-405A-A198-A10B6991B56E")
            {
                this.ErrorData = new HRESULTError();
                ((HRESULTError)this.ErrorData).Parse(s);
            }

            if (ContainsStreamObjectHeader(0x04E))
            {
                this.ErrorStringSupplementalInfoStart = new bit32StreamObjectHeaderStart();
                this.ErrorStringSupplementalInfoStart.Parse(s);
                this.ErrorStringSupplementalInfo = new StringItem();
                this.ErrorStringSupplementalInfo.Parse(s);
            }

            if (ContainsStreamObjectStart32BitHeader(0x04D))
            {
                this.ChainedError = new ResponseError();
                this.ChainedError.Parse(s);
            }
            this.ErrorEnd = new bit16StreamObjectHeaderEnd();
            this.ErrorEnd.Parse(s);
        }
        /// <summary>
        /// Parse the FsshttpbSubResponse structure.
        /// </summary>
        /// <param name="s">An stream containing FsshttpbSubResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            this.SubResponseStart = new bit32StreamObjectHeaderStart();
            this.SubResponseStart.Parse(s);
            this.RequestID = new CompactUnsigned64bitInteger();
            this.RequestID = RequestID.TryParse(s);
            this.RequestType = new CompactUnsigned64bitInteger();
            this.RequestType = RequestType.TryParse(s);
            byte tempByte = ReadByte();
            this.Status = GetBits(tempByte, 0, 1);
            this.Reserved = GetBits(tempByte, 1, 7);
            if (this.Status == 0x1)
            {
                this.ResponseError = new ResponseError();
                this.ResponseError.Parse(s);
            }
            else
            {
                if (this.RequestType.GetUint(RequestType) == 0x01)
                {
                    this.SubResponseData = new QueryAccessResponse();
                    ((QueryAccessResponse)this.SubResponseData).Parse(s);
                }
                else if (this.RequestType.GetUint(RequestType) == 0x02)
                {
                    this.SubResponseData = new QueryChangesResponse();
                    ((QueryChangesResponse)this.SubResponseData).Parse(s);
                }
                else if (this.RequestType.GetUint(RequestType) == 0x05)
                {
                    this.SubResponseData = new PutChangesResponse();
                    ((PutChangesResponse)this.SubResponseData).Parse(s);
                }
                else if (this.RequestType.GetUint(RequestType) == 0x0B)
                {
                    this.SubResponseData = new AllocateExtendedGUIDRange();
                    ((AllocateExtendedGUIDRange)this.SubResponseData).Parse(s);
                }

            }
            this.SubResponseEnd = new bit16StreamObjectHeaderEnd();
            this.SubResponseEnd.Parse(s);
        }
 /// <summary>
 /// Parse the QueryAccessResponse structure.
 /// </summary>
 /// <param name="s">An stream containing QueryAccessResponse structure.</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.ReadAccessResponseStart = new bit32StreamObjectHeaderStart();
     this.ReadAccessResponseStart.Parse(s);
     this.ReadAccessResponseError = new ResponseError();
     this.ReadAccessResponseError.Parse(s);
     this.ReadAccessResponseEnd = new bit16StreamObjectHeaderEnd();
     this.ReadAccessResponseEnd.Parse(s);
     this.WriteAccessResponseStart = new bit32StreamObjectHeaderStart();
     this.WriteAccessResponseStart.Parse(s);
     this.WriteAccessResponseError = new ResponseError();
     this.WriteAccessResponseError.Parse(s);
     this.WriteAccessResponseEnd = new bit16StreamObjectHeaderEnd();
     this.WriteAccessResponseEnd.Parse(s);
 }
        /// <summary>
        /// Parse the FsshttpbResponse structure.
        /// </summary>
        /// <param name="s">An stream containing FsshttpbResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            this.ProtocolVersion = ReadUshort();
            this.MinimumVersion = ReadUshort();
            this.Signature = ReadUlong();
            this.ResponseStart = new bit32StreamObjectHeaderStart();
            this.ResponseStart.Parse(s);
            byte tempByte = ReadByte();
            this.Status = GetBits(tempByte, 0, 1);
            this.Reserved = GetBits(tempByte, 1, 7);

            if (this.Status == 0x1)
            {
                this.ResponseError = new ResponseError();
                this.ResponseError.Parse(s);
            }
            else
            {
                if (ContainsStreamObjectHeader(0x15))
                {
                    this.DataElementPackage = new DataElementPackage();
                    this.DataElementPackage.Parse(s);
                }

                if (ContainsStreamObjectHeader(0x041))
                {
                    List<FsshttpbSubResponse> tempResponses = new List<FsshttpbSubResponse>();
                    do
                    {
                        FsshttpbSubResponse subResponse = new FsshttpbSubResponse();
                        subResponse.Parse(s);
                        tempResponses.Add(subResponse);
                        this.SubResponses = tempResponses.ToArray();
                    } while (ContainsStreamObjectHeader(0x041));
                }
            }

            this.ResponseEnd = new bit16StreamObjectHeaderEnd();
            this.ResponseEnd.Parse(s);
        }