FindItemsWithFolderIdAndFilterAndView method

Future<FindItemsResults<Item>> FindItemsWithFolderIdAndFilterAndView(
  1. FolderId parentFolderId,
  2. SearchFilter? searchFilter,
  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 filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection The view controlling the number of items returned.

Implementation

Future<FindItemsResults<Item>> FindItemsWithFolderIdAndFilterAndView(
    FolderId parentFolderId,
    SearchFilter? searchFilter,
    ViewBase view) async {
  EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

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

  return responses[0].Results;
}