/// <summary> /// Verify RopGetReceiveFolderTable Failure Response /// </summary> /// <param name="ropGetReceiveFolderTableResponse">The failure response of RopGetReceiveFolderTable request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopGetReceiveFolderTable request</param> private void VerifyRopGetReceiveFolderTableFailureResponse(RopGetReceiveFolderTableResponse ropGetReceiveFolderTableResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R215"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R215 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetReceiveFolderTableResponse.RopId.GetType(), 215, @"[In RopGetReceiveFolderTable ROP Failure Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R217"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R217 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopGetReceiveFolderTable, ropGetReceiveFolderTableResponse.RopId, 217, @"[In RopGetReceiveFolderTable ROP Failure Response Buffer] RopId (1 byte): For this operation[RopGetReceiveFolderTable], this field[RopId (1 byte)] is set to 0x68."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R218"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R218 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetReceiveFolderTableResponse.InputHandleIndex.GetType(), 218, @"[In RopGetReceiveFolderTable ROP Failure Response Buffer] InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R219"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R219 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropGetReceiveFolderTableResponse.InputHandleIndex, 219, @"[In RopGetReceiveFolderTable ROP Failure Response Buffer] InputHandleIndex (1 byte): This index MUST be set to the value specified in the InputHandleIndex field in the request."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R220"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R220 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropGetReceiveFolderTableResponse.ReturnValue.GetType(), 220, @"[In RopGetReceiveFolderTable ROP Failure Response Buffer] ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R222"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R222 Site.CaptureRequirementIfAreNotEqual<uint>( SuccessReturnValue, ropGetReceiveFolderTableResponse.ReturnValue, 222, @"[In RopGetReceiveFolderTable ROP Failure Response Buffer] ReturnValue (4 bytes): For this response[Failure response], this field is set to a value other than 0x00000000."); }
/// <summary> /// Verify the response by sending the ROP RopGetReceiveFolderTable. /// </summary> /// <param name="response">The structure of ROP RopGetReceiveFolderTable response.</param> private void VerifyRopGetReceiveFolderTable(RopGetReceiveFolderTableResponse response) { if (response.ReturnValue == 0) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R282"); // If the response can be parsed successfully and the return value is success, indicates the ROP's functionality is consistent with its description. this.Site.CaptureRequirement( 282, @"[In RopGetReceiveFolderTable ROP] The RopGetReceiveFolderTable is used to obtain a comprehensive list of all configured message classes and their associated Receive folders."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R297, the rows count:{0}", response.Rows == null ? 0 : response.Rows.Count); uint actualRowsCount = 0; // Check if server returns row information. if (response.Rows != null && response.Rows.Count > 0) { // Get each row from the Rows structure. for (int rowIndex = 0; rowIndex < response.Rows.Count; rowIndex++) { PropertyRow row = response.Rows.PropertyRows[rowIndex]; actualRowsCount++; #region Verify each row's format // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R297, the flag is: {0}.", row.Flag); bool isVerifiedR297 = row.Flag == 0x00 || row.Flag == 0x01; Site.CaptureRequirementIfIsTrue( isVerifiedR297, 297, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows: Each row is returned in either a StandardPropertyRow structure or a FlaggedPropertyRow structure, both of which [StandardPropertyRow, FlaggedPropertyRow] are specified in [MS-OXCDATA] section 2.8.1.1 and [MS-OXCDATA] section 2.8.1.2, respectively."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R877, the flag is: {0}.", row.Flag); bool isVerifiedR877 = row.Flag == 0x00 || row.Flag == 0x01; // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R877 Site.CaptureRequirementIfIsTrue( isVerifiedR877, 877, @"[In Receiving a RopGetReceiveFolderTable ROP Request] The Rows field of the RopGetReceiveFolderTable response (section 2.2.1.4.2) contains either a StandardPropertyRow structure or a FlaggedPropertyRow structure for each row of the Receive folder table."); // According to the description in [MS-OXCDATA], the structure of StandardPropertyRow and FlaggedPropertyRow // consists of a Flag field (1 byte) and a ValueArray field (byte[]). And the Row field which is contained in the Rows // field has been designed as the structure above in this test suite. So it's only need to verify the Flag field to // be 0x00 (which indicates a StandardPropertyRow structure), or 0x01(which indicates a FlaggedPropertyRow structure.). #region StandardPropertyRow // If this ValueArray is a StandardPropertyRow structure (0x00). if (row.Flag == 0x00) { // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R299"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R299 this.Site.CaptureRequirementIfAreEqual<byte>( 0x00, row.Flag, 299, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows: The value of each structure's [StandardPropertyRow structure, FlaggedPropertyRow] Flag field indicates which structure is being used: 0x00 for the StandardPropertyRow structure."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R879"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R879 Site.CaptureRequirementIfAreEqual<byte>( 0x00, row.Flag, 879, @"[In Receiving a RopGetReceiveFolderTable ROP Request] Otherwise [if there is not an error retrieving any data of a row from the Receive folder table], the server returns the row formatted as a StandardPropertyRow structure."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R301"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R301 // According to the description in [MS-OXCDATA], the structure of StandardPropertyRow and FlaggedPropertyRow consists of a Flag field (1 byte) and a ValueArray field (byte[]). // And the Row field which is contained in the Rows field has been designed as the structure above in this test suite. // So it's only need to verify the count of the structures that each row contains, then this requirement will be verified. Site.CaptureRequirementIfAreEqual<int>( 3, row.PropertyValues.Count, 301, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows: The ValueArray field of either StandardPropertyRow or FlaggedPropertyRow MUST include only the following properties[PidTagFolderId property, PidTagMessageClass property, PidTagLastModificationTime property], in the order given, and no other properties."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCDATA_R72"); // Verify MS-OXCDATA requirement: MS-OXCDATA_R72 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), row.Flag.GetType(), "MS-OXCDATA", 72, @"[In StandardPropertyRow Structure] Flag (1 byte): An unsigned integer."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R73"); // If server returns 0x00 for the Flag field, which indicates that all property // values are present and without error, then this requirement will be verified. Site.CaptureRequirement( "MS-OXCDATA", 73, @"[In StandardPropertyRow Structure] Flag (1 byte): This value MUST be set to 0x00 to indicate that all property values are present and without error."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R75"); // This requirement is verified using SDK, so it can be captured directly. Site.CaptureRequirement( "MS-OXCDATA", 75, @"[In StandardPropertyRow Structure] ValueArray (variable): At each position of the array, the structure will either be a PropertyValue structure, as specified in section 2.11.2.1, if the type of the corresponding property tag was specified, or a TypedPropertyValue structure, as specified in section 2.11.3, if the type of the corresponding property tag was PtypUnspecified (section 2.11.1)."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R79"); // If server returns 0x00 for the Flag field, which indicates that all property // values are present and without error, then this requirement will be verified. Site.CaptureRequirement( "MS-OXCDATA", 79, @"[In FlaggedPropertyRow Structure] Flag (1 byte): Otherwise [when PtypUnspecified was not used in the ROP request and the ROP response includes a type], this value MUST be set to 0x00."); // PidTagMessageClass property byte[] messageClassBytes = row.PropertyValues[1].Value; string messageClass = Encoding.ASCII.GetString(messageClassBytes); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R305"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R305 // If the PidTagMessageClass property can be parsed as ASCII string, and not null, indicates it's the ASCII string. this.Site.CaptureRequirementIfIsNotNull( messageClass, 305, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property ([MS-OXPROPS] section 2.778): A PtypString8 value."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R307"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R307 this.Site.CaptureRequirementIfAreEqual<byte>( 0, messageClassBytes[messageClassBytes.Length - 1], 307, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] includes the terminating NULL character."); } #endregion #region Verify each row's message class // According to the [MS-OXCSTOR] section 2.2.1.4.2, each row structure contains three elements: PidTagFolderId, PidTagMessageClass, PidTagLastModificationTime. // Get the second array in the row structure(row.PropertyValues[1].value) which represents the PidTagMessageClass structure. // If server returns MessageClass information for this row. if (row.PropertyValues[1].Value != null) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R308"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R308 Site.CaptureRequirementIfIsTrue( Common.IsNullTerminatedASCIIStr(row.PropertyValues[1].Value), 308, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] MUST meet the following requirements: The string uses ASCII encoding."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R309, the size of the string is: {0}.", row.PropertyValues[1].Value.Length); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R309 bool isVerifyR309 = row.PropertyValues[1].Value.Length > 0 && row.PropertyValues[1].Value.Length <= 255; Site.CaptureRequirementIfIsTrue( isVerifyR309, 309, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] MUST meet the following requirements: The length (including the terminating NULL character) is greater than zero and less than or equal to 255."); // If the length of the "row.PropertyValues[1].value" is 1 ,the byte is terminator if (row.PropertyValues[1].Value.Length != 1) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R310, the MessageClass string is: {0}.", row.PropertyValues[1].Value.ToString()); // If there is one character value in the string is not in the numeric range of 32 to 126, this value will be false. bool isValidateValue = true; // Get each character value in the string. // The last one byte is terminator for (int i = 0; i < row.PropertyValues[1].Value.Length - 1; i++) { // Check if each character value in the string is in the numeric range of 32 to 126 if ((row.PropertyValues[1].Value[i] < 32) || (row.PropertyValues[1].Value[i] > 126)) { isValidateValue = false; break; } } // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R310 Site.CaptureRequirementIfIsTrue( isValidateValue, 310, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] MUST meet the following requirements: Each character value in the string is in the numeric range of 32 to 126, inclusive."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R311"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R311 // Check the first character in the string (row.PropertyValues[1].Value[0]) is not ".". Site.CaptureRequirementIfAreNotEqual<byte>( (byte)'.', row.PropertyValues[1].Value[0], 311, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] MUST meet the following requirements: The string does not begin with a period (""."")."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R312"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R312 // Check the last character in the string (row.PropertyValues[1].value[row.PropertyValues[1].value.Length - 1]) is not ".". Site.CaptureRequirementIfAreNotEqual<byte>( (byte)'.', row.PropertyValues[1].Value[row.PropertyValues[1].Value.Length - 1], 312, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] MUST meet the following requirements: The string does not end with a period."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R313, the string is: {0}.", row.PropertyValues[1].Value.ToString()); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R313 // if the character in the string is "-", the value will be false. bool isVerifyR313 = true; // Get each character in the string. foreach (byte elem in row.PropertyValues[1].Value) { // If there is one character to be "-", R313 will be failed. if (elem == (byte)'-') { isVerifyR313 = false; break; } } Site.CaptureRequirementIfIsTrue( isVerifyR313, 313, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] [Rows] PidTagMessageClass property: The string [PidTagMessageClass] MUST meet the following requirements: The string does not contain adjacent periods."); } } // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R301"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R301 // According to the description in [MS-OXCDATA], the structure of StandardPropertyRow and FlaggedPropertyRow consists of a Flag field (1 byte) and a ValueArray field (byte[]). // And the Row field which is contained in the Rows field has been designed as the structure above in this test suite. // So it's only need to verify the count of the structures that each row contains, then this requirement will be verified. Site.CaptureRequirementIfAreEqual<int>( 3, row.PropertyValues.Count, 301, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows: The ValueArray field of either StandardPropertyRow or FlaggedPropertyRow MUST include only the following properties[PidTagFolderId property, PidTagMessageClass property, PidTagLastModificationTime property], in the order given, and no other properties."); #endregion #endregion } // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R296"); // If parse the Rows field as the array successfully, indicates the Rows field is consistent with its description. this.Site.CaptureRequirement( 296, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows: An array that contains the rows of the Receive folder table."); } // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R294"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R294 this.Site.CaptureRequirementIfAreEqual<uint>( response.RowCount, actualRowsCount, 294, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] RowCount: The number of rows in the table."); } }
/// <summary> /// Verify RopGetReceiveFolderTable Success Response /// </summary> /// <param name="ropGetReceiveFolderTableResponse">The success response of RopGetReceiveFolderTable request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopGetReceiveFolderTable request</param> private void VerifyRopGetReceiveFolderTableSuccessResponse(RopGetReceiveFolderTableResponse ropGetReceiveFolderTableResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R197"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R197 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetReceiveFolderTableResponse.RopId.GetType(), 197, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R199"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R199 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopGetReceiveFolderTable, ropGetReceiveFolderTableResponse.RopId, 199, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] RopId (1 byte): For this operation[RopGetReceiveFolderTable], this field[RopId (1 byte)] is set to 0x68."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R200"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R200 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetReceiveFolderTableResponse.InputHandleIndex.GetType(), 200, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R201"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R201 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropGetReceiveFolderTableResponse.InputHandleIndex, 201, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] InputHandleIndex (1 byte): This index MUST be set to the value specified in the InputHandleIndex field in the request."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R202"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R202 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropGetReceiveFolderTableResponse.ReturnValue.GetType(), 202, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] ReturnValue (4 bytes): ): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R204"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R204 Site.CaptureRequirementIfAreEqual<uint>( SuccessReturnValue, ropGetReceiveFolderTableResponse.ReturnValue, 204, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] ReturnValue (4 bytes): For this response[Success Response], this field is set to 0x00000000."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R205"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R205 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropGetReceiveFolderTableResponse.RowCount.GetType(), 205, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] RowCount (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R207"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R207 // The class PropertyRowSet is List of PropertRow, if the type of Rows is PropertyRowSet can verify R207 Site.CaptureRequirementIfAreEqual<Type>( typeof(PropertyRowSet), ropGetReceiveFolderTableResponse.Rows.GetType(), 207, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows (variable):An array of row structures."); // Add the debug information Site.Log.Add( LogEntryKind.Debug, "Verify MS-OXCROPS_R209,the rows count:{0}", ropGetReceiveFolderTableResponse.Rows == null ? 0 : ropGetReceiveFolderTableResponse.Rows.Count); // Verify MS-OXCROPS requirement: MS-OXCROPS_R209 bool isStandardPropertyRowOrFlaggedPropertyRow = true; if (ropGetReceiveFolderTableResponse.Rows != null) { // The rows count.If the count greater than 0, then the PropertyRows is not null and the array of PropertyRow length greater than 0. if (ropGetReceiveFolderTableResponse.Rows.Count > 0) { foreach (PropertyRow propertyRow in ropGetReceiveFolderTableResponse.Rows.PropertyRows) { // According to the de-serialize approach of ropGetReceiveFolderTableResponse,flag indicates the type of PropertyRow // From MS-OXCDATA,Flag is 0x00, representing StandardPropertyRow. Flag is 0x01, representing FlaggedPropertyRow. if ((propertyRow.Flag != ((byte)PropertyRowFlag.StandardPropertyRow)) && (propertyRow.Flag != (byte)PropertyRowFlag.FlaggedPropertyRow)) { isStandardPropertyRowOrFlaggedPropertyRow = false; break; } } } bool isVerifyR209 = isStandardPropertyRowOrFlaggedPropertyRow; Site.CaptureRequirementIfIsTrue( isVerifyR209, 209, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows (variable): Each row is returned in either a StandardPropertyRow structure, as specified in[MS-OXCDATA] section 2.8.1.1, or a FlaggedPropertyRow structure, as specified in [MS-OXCDATA] section 2.8.1.2. "); } // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R210"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R210 Site.CaptureRequirementIfAreEqual<uint>( ropGetReceiveFolderTableResponse.RowCount, (uint)ropGetReceiveFolderTableResponse.Rows.Count, 210, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows (variable): The number of row structures contained in this field is specified by the RowCount field."); #region Verify R211 // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R211"); bool isVerifyR211 = true; PropertyRowSet propertyRowSet = ropGetReceiveFolderTableResponse.Rows; if (propertyRowSet != null) { foreach (PropertyRow propertyRow in propertyRowSet.PropertyRows) { // ValueArray include only the PidTagFolderId, PidTagMessageClass, and PidTagLastModificationTime properties isVerifyR211 &= propertyRow.PropertyValues.Count == 3; if (!isVerifyR211) { break; } // De-serialize the property PidTagFolderId as PtypInteger64. // Specified in MS-OXPROPS. isVerifyR211 &= propertyRow.PropertyValues[0].Size() == sizeof(long); if (!isVerifyR211) { break; } BitConverter.ToInt64(propertyRow.PropertyValues[0].Value, 0); // De-serialize the property PidTagMessageClass as PtypString. // Specified in MS-OXPROPS. isVerifyR211 &= this.IsNullTerminatedASCIIStr(propertyRow.PropertyValues[1].Value); if (!isVerifyR211) { break; } Encoding.Unicode.GetString(propertyRow.PropertyValues[1].Value); // De-serialize the property PidTagLastModificationTime as PtypTime. // Specified in MS-OXPROPS. isVerifyR211 &= propertyRow.PropertyValues[2].Size() == sizeof(long); if (!isVerifyR211) { break; } DateTime.FromFileTimeUtc(BitConverter.ToInt64(propertyRow.PropertyValues[2].Value, 0)); } } // Verify MS-OXCROPS requirement: MS-OXCROPS_R211 // The de-serialize process has verified that the ValueArray include only the PidTagFolderId, PidTagMessageClass, // and PidTagLastModificationTime properties, in that order, and no other properties Site.CaptureRequirementIfIsTrue( isVerifyR211, 211, @"[In RopGetReceiveFolderTable ROP Success Response Buffer] Rows (variable): The ValueArray field of either the StandardPropertyRow structure or the FlaggedPropertyRow structure MUST include only the PidTagFolderId ([MS-OXCFOLD] section 2.2.2.2.1.6), PidTagMessageClass ([MS-OXCMSG] section 2.2.1.3), and PidTagLastModificationTime ([MS-OXCMSG] section 2.2.2.2) properties, in that order, and no other properties."); #endregion }