FindItems method

Future<FindItemsResults<Item>?> FindItems(
  1. SearchFilter searchFilter,
  2. ItemView view
)
Obtains a list of items by searching the contents of this folder. Calling this method results in a call to EWS. 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>?> FindItems(
    SearchFilter searchFilter, ItemView view) async {
  EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

  ServiceResponseCollection<FindItemResponse<Item>> responses = await this
      .InternalFindItemsGeneric<Item>(searchFilter, view, null /* groupBy */);

  return responses[0].Results;
}