FindItemsWithFolderIdAndQueryAndHighlightAndViewAndGrouping method
Future<GroupedFindItemsResults<Item> ?>
FindItemsWithFolderIdAndQueryAndHighlightAndViewAndGrouping()
Implementation
Future<GroupedFindItemsResults<Item>?>
FindItemsWithFolderIdAndQueryAndHighlightAndViewAndGrouping(
FolderId parentFolderId,
String queryString,
bool returnHighlightTerms,
ViewBase view,
Grouping groupBy) async {
List<FolderId> parentFolderIds = [parentFolderId];
EwsUtilities.ValidateParamCollection(parentFolderIds, "parentFolderIds");
EwsUtilities.ValidateParam(view, "view");
EwsUtilities.ValidateParam(groupBy, "groupBy");
EwsUtilities.ValidateParamAllowNull(queryString, "queryString");
EwsUtilities.ValidateParamAllowNull(
returnHighlightTerms, "returnHighlightTerms");
EwsUtilities.ValidateMethodVersion(
this, ExchangeVersion.Exchange2013, "FindItems");
FindItemRequest<Item> request =
new FindItemRequest<Item>(this, ServiceErrorHandling.ThrowOnError);
request.ParentFolderIds.AddRangeFolderIds(parentFolderIds);
request.QueryString = queryString;
request.ReturnHighlightTerms = returnHighlightTerms;
request.View = view;
request.GroupBy = groupBy;
ServiceResponseCollection<FindItemResponse<Item>> responses =
await request.Execute();
return responses[0].GroupedFindResults;
}