FindItemsWithFolderIdAndQueryAndViewAndGrouping method

Future<GroupedFindItemsResults<Item>?> FindItemsWithFolderIdAndQueryAndViewAndGrouping(
  1. FolderId parentFolderId,
  2. String queryString,
  3. ViewBase view,
  4. Grouping groupBy,
)
Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS. The Id of the folder in which to search for items. query string to be used for indexed search The view controlling the number of items returned. The group by clause.

Implementation

Future<GroupedFindItemsResults<Item>?>
    FindItemsWithFolderIdAndQueryAndViewAndGrouping(FolderId parentFolderId,
        String queryString, ViewBase view, Grouping groupBy) async {
  EwsUtilities.ValidateParam(groupBy, "groupBy");
  EwsUtilities.ValidateParamAllowNull(queryString, "queryString");

  ServiceResponseCollection<FindItemResponse<Item>> responses =
      await this.FindItemsGeneric<Item>(
          [parentFolderId],
          null,
          /* searchFilter */
          queryString,
          view,
          groupBy,
          ServiceErrorHandling.ThrowOnError);

  return responses[0].GroupedFindResults;
}