/// <summary>
 /// Parse the RopReloadCachedInformationResponse structure.
 /// </summary>
 /// <param name="s">An stream containing RopReloadCachedInformationResponse structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId = (RopIdType)ReadByte();
     this.InputHandleIndex = ReadByte();
     HelpMethod help = new HelpMethod();
     this.ReturnValue = help.FormatErrorCode(ReadUint());
     if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
     {
         this.HasNamedProperties = ReadBoolean();
         this.SubjectPrefix = new TypedString();
         this.SubjectPrefix.Parse(s);
         this.NormalizedSubject = new TypedString();
         this.NormalizedSubject.Parse(s);
         this.RecipientCount = ReadUshort();
         this.ColumnCount = ReadUshort();
         List<PropertyTag> propertyTags = new List<PropertyTag>();
         for (int i = 0; i < this.ColumnCount; i++)
         {
             PropertyTag propertyTag = new PropertyTag();
             propertyTag.Parse(s);
             propertyTags.Add(propertyTag);
         }
         this.RecipientColumns = propertyTags.ToArray();
         this.RowCount = ReadByte();
         List<OpenRecipientRow> openRecipientRows = new List<OpenRecipientRow>();
         for (int i = 0; i < this.RowCount; i++)
         {
             OpenRecipientRow openRecipientRow = new OpenRecipientRow(this.RecipientColumns);
             openRecipientRow.Parse(s);
             openRecipientRows.Add(openRecipientRow);
         }
         this.RecipientRows = openRecipientRows.ToArray();
     }
 }
        /// <summary>
        /// Parse the RopOptionsDataResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopOptionsDataResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.Reserved = ReadByte();
                this.OptionalInfoSize = ReadUshort();
                this.OptionalInfo = ConvertArray(ReadBytes((int)this.OptionalInfoSize));
                this.HelpFileSize = ReadUshort();
                if (this.HelpFileSize != 0)
                {
                    this.HelpFile = ConvertArray(ReadBytes((int)this.HelpFileSize));
                    this.HelpFileName = new MAPIString(Encoding.ASCII);
                    this.HelpFileName.Parse(s);
                }
            }
        }
        /// <summary>
        /// Parse the RopAbortSubmitResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopAbortSubmitResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
        }
        /// <summary>
        /// Parse the RopFindRowResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopFindRowResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.RowNoLongerVisible = ReadBoolean();
                this.HasRowData = ReadBoolean();
                if ((bool)HasRowData)
                {
                    PropertyRow tempPropertyRow = new PropertyRow(propertiesBySetColum);
                    this.RowData = tempPropertyRow;
                    this.RowData.Parse(s);
                }
            }
        }
        /// <summary>
        /// Parse the RopQueryColumnsAllResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopQueryColumnsAllResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.PropertyTagCount = ReadUshort();
                List<PropertyTag> tempPropertyTags = new List<PropertyTag>();
                for (int i = 0; i < this.PropertyTagCount; i++)
                {
                    PropertyTag tempPropertyTag = new PropertyTag();
                    tempPropertyTag.Parse(s);
                    tempPropertyTags.Add(tempPropertyTag);
                }
                this.PropertyTags = tempPropertyTags.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopGetStoreStateResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetStoreStateResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            List<PropertyRow> TmpRows = new List<PropertyRow>();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.StoreState = ReadUint();
            }
        }
        /// <summary>
        /// Parse the RopSeekRowResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopSeekRowResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.HasSoughtLess = ReadBoolean();
                this.RowsSought = ReadINT32();
            }
        }
        /// <summary>
        /// Parse the RopQueryNamedPropertiesResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopQueryNamedPropertiesResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.IdCount = ReadUshort();
                this.PropertyIds = ConvertArray(new ushort[(int)this.IdCount]);
                this.PropertyNames = new PropertyName[(int)this.IdCount];
                for (int i = 0; i < this.IdCount; i++)
                {
                    PropertyIds[i] = ReadUshort();
                }
                for (int i = 0; i < this.IdCount; i++)
                {
                    PropertyNames[i] = new PropertyName();
                    PropertyNames[i].Parse(s);
                }
            }
        }
        /// <summary>
        /// Parse the RopSetPropertiesResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopSetPropertiesResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            List<PropertyRow> TmpRows = new List<PropertyRow>();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.PropertyProblemCount = ReadUshort();
                PropertyProblem[] InterPropertyProblem = new PropertyProblem[(int)this.PropertyProblemCount];
                for (int i = 0; i < this.PropertyProblemCount; i++)
                {
                    InterPropertyProblem[i] = new PropertyProblem();
                    InterPropertyProblem[i].Parse(s);
                }
                this.PropertyProblems = InterPropertyProblem;
            }
        }
        /// <summary>
        /// Parse the RopGetPropertiesSpecificResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetPropertiesSpecificResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.RowData = new PropertyRow(DecodingContext.GetPropertiesSpec_propertyTags[MapiInspector.MAPIInspector.currentParsingSessionID][this.InputHandleIndex]);
                this.RowData.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopProgressResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopProgressResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LogonId = ReadByte();
                this.CompletedTaskCount = ReadUint();
                this.TotalTaskCount = ReadUint();
            }
        }
 /// <summary>
 /// Parse the RopGetValidAttachmentsResponse structure.
 /// </summary>
 /// <param name="s">An stream containing RopGetValidAttachmentsResponse structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId = (RopIdType)ReadByte();
     this.OutputHandleIndex = ReadByte();
     HelpMethod help = new HelpMethod();
     this.ReturnValue = help.FormatErrorCode(ReadUint());
     if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
     {
         this.AttachmentIdCount = ReadUshort();
         List<int> attachmentIdArrays = new List<int>();
         for (int i = 0; i < this.AttachmentIdCount; i++)
         {
             attachmentIdArrays.Add(ReadINT32());
         }
         this.AttachmentIdArray = ConvertArray(attachmentIdArrays.ToArray());
     }
 }
 /// <summary>
 /// Parse the RopCreateMessageResponse structure.
 /// </summary>
 /// <param name="s">An stream containing RopCreateMessageResponse structure.</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId = (RopIdType)ReadByte();
     this.OutputHandleIndex = ReadByte();
     HelpMethod help = new HelpMethod();
     this.ReturnValue = help.FormatErrorCode(ReadUint());
     if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
     {
         this.HasMessageId = ReadBoolean();
         if ((bool)this.HasMessageId)
         {
             this.MessageId = new MessageID();
             this.MessageId.Parse(s);
         }
     }
 }
 /// <summary>
 /// Parse the RopSetMessageReadFlagResponse structure.
 /// </summary>
 /// <param name="s">An stream containing RopSetMessageReadFlagResponse structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId = (RopIdType)ReadByte();
     this.ResponseHandleIndex = ReadByte();
     HelpMethod help = new HelpMethod();
     this.ReturnValue = help.FormatErrorCode(ReadUint());
     if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
     {
         this.ReadStatusChanged = ReadBoolean();
         if ((bool)this.ReadStatusChanged)
         {
             this.LogonId = ReadByte();
             this.ClientData = ConvertArray(ReadBytes(24));
         }
     }
 }
        /// <summary>
        /// Parse the RopGetPerUserLongTermIdsResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetPerUserLongTermIdsResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LongTermIdCount = ReadUshort();
                this.LongTermIds = new LongTermID[(int)this.LongTermIdCount];
                for (int i = 0; i < this.LongTermIdCount; i++)
                {
                    this.LongTermIds[i] = new LongTermID();
                    this.LongTermIds[i].Parse(s);
                }
            }
        }
        /// <summary>
        /// Parse the RopCopyToResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopCopyToResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.SourceHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.PropertyProblemCount = ReadUshort();
                PropertyProblem[] InterPropertyProblem = new PropertyProblem[(int)this.PropertyProblemCount];
                for (int i = 0; i < this.PropertyProblemCount; i++)
                {
                    InterPropertyProblem[i] = new PropertyProblem();
                    InterPropertyProblem[i].Parse(s);
                }
                this.PropertyProblems = InterPropertyProblem;
            }
            else if ((AdditionalErrorCodes)this.ReturnValue == AdditionalErrorCodes.NullDestinationObject)
            {
                this.DestHandleIndex = ReadUint();
            }
        }
        /// <summary>
        /// Parse the RopGetReceiveFolderTableResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetReceiveFolderTableResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            List<PropertyRow> TmpRows = new List<PropertyRow>();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.RowCount = ReadUint();

                for (int i = 0; i < this.RowCount; i++)
                {
                    // PidTagMessageClass is defined as PtypString8 due to Open Specification said all characters in this property MUST be from the
                    // ASCII characters 0x20 through 0x7F.
                    PropertyTag[] Properties_GetReceiveFolderTable = new PropertyTag[3]
                    { new PropertyTag(PropertyDataType.PtypInteger64, PidTagPropertyEnum.PidTagFolderId),
                      new PropertyTag(PropertyDataType.PtypString8, PidTagPropertyEnum.PidTagMessageClass),
                      new PropertyTag(PropertyDataType.PtypTime, PidTagPropertyEnum.PidTagLastModificationTime)
                    };
                    PropertyRow ProRow = new PropertyRow(Properties_GetReceiveFolderTable);
                    ProRow.Parse(s);
                    TmpRows.Add(ProRow);
                }
                this.Rows = TmpRows.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopCopyToStreamResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopCopyToStreamResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.SourceHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.NullDestinationObject)
            {
                this.DestHandleIndex = ReadUint();
            }
            this.ReadByteCount = ReadUlong();
            this.WrittenByteCount = ReadUlong();
        }
        /// <summary>
        /// Parse the RopLogonResponse_PublicFolders structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonResponse_PublicFolders structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.OutputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.FolderIds = new FolderID[13];
                for (int i = 0; i < 13; i++)
                {
                    FolderIds[i] = new FolderID();
                    FolderIds[i].Parse(s);
                }
                this.ReplId = ReadUshort();
                this.ReplGuid = ReadGuid();
                this.PerUserGuid = ReadGuid();
            }
            else if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.WrongServer)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.ServerNameSize = ReadByte();
                this.ServerName = new MAPIString(Encoding.ASCII);
                this.ServerName.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopGetPropertiesAllResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetPropertiesAllResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.PropertyValueCount = ReadUshort();
                TaggedPropertyValue[] InterValue = new TaggedPropertyValue[(int)this.PropertyValueCount];
                for (int i = 0; i < this.PropertyValueCount; i++)
                {
                    InterValue[i] = new TaggedPropertyValue();
                    InterValue[i].Parse(s);
                }
                this.PropertyValues = InterValue;
            }
        }
        /// <summary>
        /// Parse the RopExpandRowResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopExpandRowResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.ExpandedRowCount = ReadUint();
                this.RowCount = ReadUshort();
                List<PropertyRow> tempPropertyRows = new List<PropertyRow>();
                for (int i = 0; i < RowCount; i++)
                {
                    PropertyRow tempPropertyRow = new PropertyRow(this.propertiesBySetColum);
                    tempPropertyRow.Parse(s);
                    tempPropertyRows.Add(tempPropertyRow);
                }
                this.RowData = tempPropertyRows.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopFastTransferDestinationPutBufferResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopFastTransferDestinationPutBufferResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.TransferStatus = ReadUshort();
                this.InProgressCount = ReadUshort();
                this.TotalStepCount = ReadUshort();
                this.Reserved = ReadByte();
                this.BufferUsedSize = ReadUshort();
            }
        }
        /// <summary>
        /// Parse the RopGetCollapseStateResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetCollapseStateResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.CollapseStateSize = ReadUshort();
                this.CollapseState = ConvertArray(ReadBytes((int)CollapseStateSize));
            }
        }
        /// <summary>
        /// Parse the RopFastTransferSourceGetBufferResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopFastTransferSourceGetBufferResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.TransferStatus = (TransferStatus)ReadUshort();
                this.InProgressCount = ReadUshort();
                this.TotalStepCount = ReadUshort();
                this.Reserved = ReadByte();
                this.TransferBufferSize = ReadUshort();
                byte[] Buffer = ReadBytes((int)this.TransferBufferSize);
                FastTransferStream TransferStream = new FastTransferStream(Buffer, true);

                switch (DecodingContext.StreamType_Getbuffer)
                {
                    case FastTransferStreamType.TopFolder:
                        this.TransferBuffer = new TopFolder(TransferStream);
                        break;
                    case FastTransferStreamType.contentsSync:
                        this.TransferBuffer = new ContentsSync(TransferStream);
                        break;
                    case FastTransferStreamType.hierarchySync:
                        this.TransferBuffer = new HierarchySync(TransferStream);
                        break;
                    case FastTransferStreamType.state:
                        this.TransferBuffer = new State(TransferStream);
                        break;
                    case FastTransferStreamType.folderContent:
                        this.TransferBuffer = new FolderContent(TransferStream);
                        break;
                    case FastTransferStreamType.MessageContent:
                        this.TransferBuffer = new MessageContent(TransferStream);
                        break;
                    case FastTransferStreamType.attachmentContent:
                        this.TransferBuffer = new AttachmentContent(TransferStream);
                        break;
                    case FastTransferStreamType.MessageList:
                        this.TransferBuffer = new MessageList(TransferStream);
                        break;
                    default:
                        throw new Exception("The transferStream type is not right");
                }
            }

            if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.ServerBusy)
            {
                this.BackoffTime = ReadUint();
            }
        }
        /// <summary>
        /// Parse the RopGetTransportFolderResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetTransportFolderResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.FolderId = new FolderID();
                this.FolderId.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopGetLocalReplicaIdsResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetLocalReplicaIdsResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.OutputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.ReplGuid = ReadGuid();
                this.GlobalCount = ConvertArray(ReadBytes(6));
            }
        }
        /// <summary>
        /// Parse the RopTransportSendResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopTransportSendResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.NoPropertiesReturned = ReadByte();
                this.PropertyValueCount = ReadUshort();
                List<TaggedPropertyValue> tempPropertyValues = new List<TaggedPropertyValue>();
                for (int i = 0; i < this.PropertyValueCount; i++)
                {
                    TaggedPropertyValue temptaggedPropertyValue = new TaggedPropertyValue(CountWideEnum.twoBytes);
                    temptaggedPropertyValue.Parse(s);
                    tempPropertyValues.Add(temptaggedPropertyValue);
                }
                this.PropertyValues = tempPropertyValues.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopGetOwningServersResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetOwningServersResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.OwningServersCount = ReadUshort();
                this.CheapServersCount = ReadUshort();

                List<MAPIString> tmpOwning = new List<MAPIString>();
                for (int i = 0; i < this.OwningServersCount; i++)
                {
                    MAPIString subOwing = new MAPIString(Encoding.ASCII);
                    subOwing.Parse(s);
                    tmpOwning.Add(subOwing);
                }
                this.OwningServers = tmpOwning.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopGetAddressTypesResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetAddressTypesResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());

            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.AddressTypeCount = ReadUshort();
                this.AddressTypeSize = ReadUshort();
                List<MAPIString> listAddressTypes = new List<MAPIString>();

                for (int i = 0; i < this.AddressTypeCount; i++)
                {
                    MAPIString tempAddressTypes = new MAPIString(Encoding.ASCII);
                    tempAddressTypes.Parse(s);
                    listAddressTypes.Add(tempAddressTypes);
                }
                this.AddressTypes = listAddressTypes.ToArray();

            }
        }
 /// <summary>
 /// Parse the RopReadRecipientsResponse structure.
 /// </summary>
 /// <param name="s">An stream containing RopReadRecipientsResponse structure</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId = (RopIdType)ReadByte();
     this.InputHandleIndex = ReadByte();
     HelpMethod help = new HelpMethod();
     this.ReturnValue = help.FormatErrorCode(ReadUint());
     if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
     {
         this.RowCount = ReadByte();
         List<ReadRecipientRow> readRecipientRows = new List<ReadRecipientRow>();
         for (int i = 0; i < this.RowCount; i++)
         {
             ReadRecipientRow readRecipientRow = new ReadRecipientRow();
             readRecipientRow.Parse(s);
             readRecipientRows.Add(readRecipientRow);
         }
         this.RecipientRows = readRecipientRows.ToArray();
     }
 }