FindItemsWithFolderIdAndQueryAndView method

Future<FindItemsResults<Item>?> FindItemsWithFolderIdAndQueryAndView(
  1. FolderId parentFolderId,
  2. String queryString,
  3. ViewBase view
)
Obtains a 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. the search string to be used for indexed search, if any. The view controlling the number of items returned.

Implementation

Future<FindItemsResults<Item>?> FindItemsWithFolderIdAndQueryAndView(
    FolderId parentFolderId, String queryString, ViewBase view) async {
  EwsUtilities.ValidateParamAllowNull(queryString, "queryString");

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

  return responses[0].Results;
}