FindItems method

Future<GroupedFindItemsResults<Item>?> FindItems(
  1. WellKnownFolderName parentFolderName,
  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. The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection The view controlling the number of items returned. The group by clause. Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS. The name 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

//        ServiceResponseCollection<FindItemResponse<TItem>> FindItems<TItem>(
//            FolderId parentFolderId,
//            SearchFilter searchFilter,
//            ViewBase view,
//            Grouping groupBy)
//            where TItem : Item
//        {
//            return this.FindItems<TItem>(
//                new FolderId[] { parentFolderId },
//                searchFilter,
//                null, /* queryString */
//                view,
//                groupBy,
//                ServiceErrorHandling.ThrowOnError);
//        }

/// <summary>
/// Obtains a grouped list of items by searching the contents of a specific folder. Calling this method results in a call to EWS.
/// </summary>
/// <param name="parentFolderName">The name of the folder in which to search for items.</param>
/// <param name="queryString">query string to be used for indexed search</param>
/// <param name="view">The view controlling the number of items returned.</param>
/// <param name="groupBy">The group by clause.</param>
/// <returns>A collection of grouped items representing the contents of the specified.</returns>
Future<GroupedFindItemsResults<Item>?> FindItems(
    WellKnownFolderName parentFolderName,
    String queryString,
    ViewBase view,
    Grouping groupBy) {
  EwsUtilities.ValidateParam(groupBy, "groupBy");

  return this.FindItemsWithFolderIdAndQueryAndViewAndGrouping(
      new FolderId.fromWellKnownFolder(parentFolderName),
      queryString,
      view,
      groupBy);
}