FindFoldersWithFolderId method

Future<FindFoldersResults> FindFoldersWithFolderId(
  1. FolderId parentFolderId,
  2. SearchFilter? searchFilter,
  3. FolderView view
)
Obtains a list of folders by searching the sub-folders of the specified folder. The Id of the folder in which to search for folders. The search filter. Available search filter classes include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection The view controlling the number of folders returned.

Implementation

Future<FindFoldersResults> FindFoldersWithFolderId(FolderId parentFolderId,
    SearchFilter? searchFilter, FolderView view) async {
  EwsUtilities.ValidateParam(parentFolderId, "parentFolderId");
  EwsUtilities.ValidateParam(view, "view");
  EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");

  ServiceResponseCollection<FindFolderResponse> responses = await this
      .InternalFindFolders([parentFolderId], searchFilter, view,
          ServiceErrorHandling.ThrowOnError);

  return responses[0].Results;
}