GetUserPhoto method
This method is for search scenarios. Retrieves a set of personas satisfying the specified search conditions.
Id of the folder being searched
The search filter. Available search filter classes
include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
SearchFilter.SearchFilterCollection
The view which defines the number of persona being returned
The query string for which the search is being performed
This method is for search scenarios. Retrieves a set of personas satisfying the specified search conditions.
Name of the folder being searched
The search filter. Available search filter classes
include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
SearchFilter.SearchFilterCollection
The view which defines the number of persona being returned
The query string for which the search is being performed
This method is for browse scenarios. Retrieves a set of personas satisfying the specified browse conditions.
Browse scenariosdon't require query string.
Id of the folder being browsed
Search filter
The view which defines paging and the number of persona being returned
This method is for browse scenarios. Retrieves a set of personas satisfying the specified browse conditions.
Browse scenarios don't require query string.
Name of the folder being browsed
Search filter
The view which defines paging and the number of personas being returned
Retrieves all people who are relevant to the user
The view which defines the number of personas being returned
Retrieves all people who are relevant to the user
The view which defines the number of personas being returned
The context for this query. See PeopleQueryContextKeys for keys
Searches for people who are relevant to the user, automatically determining
the best sources to use.
The view which defines the number of personas being returned
The query string for which the search is being performed
Searches for people who are relevant to the user
The view which defines the number of personas being returned
The query string for which the search is being performed
The context for this query. See PeopleQueryContextKeys for keys
The scope of the query.
Performs a People Query FindPeople call
The view which defines the number of personas being returned
The query string for which the search is being performed
The context for this query
The scope of the query.
Get a user's photo.
The user's email address
The desired size of the returned photo. Valid photo sizes are in UserPhotoSize
A photo's cache ID which will allow the caller to ensure their cached photo is up to date
Implementation
//ICollection<Persona> FindPeople(FolderId folderId, SearchFilter searchFilter, ViewBase view, string queryString)
// {
// EwsUtilities.ValidateParamAllowNull(folderId, "folderId");
// EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");
// EwsUtilities.ValidateParam(view, "view");
// EwsUtilities.ValidateParam(queryString, "queryString");
// EwsUtilities.ValidateMethodVersion(this, ExchangeVersion.Exchange2013_SP1, "FindPeople");
//
// FindPeopleRequest request = new FindPeopleRequest(this);
//
// request.FolderId = folderId;
// request.SearchFilter = searchFilter;
// request.View = view;
// request.QueryString = queryString;
//
// return request.Execute().Personas;
// }
/// <summary>
/// This method is for search scenarios. Retrieves a set of personas satisfying the specified search conditions.
/// </summary>
/// <param name="folderName">Name of the folder being searched</param>
/// <param name="searchFilter">The search filter. Available search filter classes
/// include SearchFilter.IsEqualTo, SearchFilter.ContainsSubstring and
/// SearchFilter.SearchFilterCollection</param>
/// <param name="view">The view which defines the number of persona being returned</param>
/// <param name="queryString">The query string for which the search is being performed</param>
/// <returns>A collection of personas matching the search conditions</returns>
//ICollection<Persona> FindPeople(WellKnownFolderName folderName, SearchFilter searchFilter, ViewBase view, string queryString)
// {
// return this.FindPeople(new FolderId(folderName), searchFilter, view, queryString);
// }
/// <summary>
/// This method is for browse scenarios. Retrieves a set of personas satisfying the specified browse conditions.
/// Browse scenariosdon't require query string.
/// </summary>
/// <param name="folderId">Id of the folder being browsed</param>
/// <param name="searchFilter">Search filter</param>
/// <param name="view">The view which defines paging and the number of persona being returned</param>
/// <returns>A result object containing resultset for browsing</returns>
//FindPeopleResults FindPeople(FolderId folderId, SearchFilter searchFilter, ViewBase view)
// {
// EwsUtilities.ValidateParamAllowNull(folderId, "folderId");
// EwsUtilities.ValidateParamAllowNull(searchFilter, "searchFilter");
// EwsUtilities.ValidateParamAllowNull(view, "view");
// EwsUtilities.ValidateMethodVersion(this, ExchangeVersion.Exchange2013_SP1, "FindPeople");
//
// FindPeopleRequest request = new FindPeopleRequest(this);
//
// request.FolderId = folderId;
// request.SearchFilter = searchFilter;
// request.View = view;
//
// return request.Execute().Results;
// }
/// <summary>
/// This method is for browse scenarios. Retrieves a set of personas satisfying the specified browse conditions.
/// Browse scenarios don't require query string.
/// </summary>
/// <param name="folderName">Name of the folder being browsed</param>
/// <param name="searchFilter">Search filter</param>
/// <param name="view">The view which defines paging and the number of personas being returned</param>
/// <returns>A result object containing resultset for browsing</returns>
//FindPeopleResults FindPeople(WellKnownFolderName folderName, SearchFilter searchFilter, ViewBase view)
// {
// return this.FindPeople(new FolderId(folderName), searchFilter, view);
// }
/// <summary>
/// Retrieves all people who are relevant to the user
/// </summary>
/// <param name="view">The view which defines the number of personas being returned</param>
/// <returns>A collection of personas matching the query string</returns>
//IPeopleQueryResults BrowsePeople(ViewBase view)
// {
// return this.BrowsePeople(view, null);
// }
/// <summary>
/// Retrieves all people who are relevant to the user
/// </summary>
/// <param name="view">The view which defines the number of personas being returned</param>
/// <param name="context">The context for this query. See PeopleQueryContextKeys for keys</param>
/// <returns>A collection of personas matching the query string</returns>
//IPeopleQueryResults BrowsePeople(ViewBase view, Dictionary<string, string> context)
// {
// return this.PerformPeopleQuery(view, "", context, null);
// }
/// <summary>
/// Searches for people who are relevant to the user, automatically determining
/// the best sources to use.
/// </summary>
/// <param name="view">The view which defines the number of personas being returned</param>
/// <param name="queryString">The query string for which the search is being performed</param>
/// <returns>A collection of personas matching the query string</returns>
//IPeopleQueryResults SearchPeople(ViewBase view, string queryString)
// {
// return this.SearchPeople(view, queryString, null, null);
// }
/// <summary>
/// Searches for people who are relevant to the user
/// </summary>
/// <param name="view">The view which defines the number of personas being returned</param>
/// <param name="queryString">The query string for which the search is being performed</param>
/// <param name="context">The context for this query. See PeopleQueryContextKeys for keys</param>
/// <param name="queryMode">The scope of the query.</param>
/// <returns>A collection of personas matching the query string</returns>
//IPeopleQueryResults SearchPeople(ViewBase view, string queryString, Dictionary<string, string> context, PeopleQueryMode queryMode)
// {
// EwsUtilities.ValidateParam(queryString, "queryString");
//
// return this.PerformPeopleQuery(view, queryString, context, queryMode);
// }
/// <summary>
/// Performs a People Query FindPeople call
/// </summary>
/// <param name="view">The view which defines the number of personas being returned</param>
/// <param name="queryString">The query string for which the search is being performed</param>
/// <param name="context">The context for this query</param>
/// <param name="queryMode">The scope of the query.</param>
/// <returns></returns>
//IPeopleQueryResults PerformPeopleQuery(ViewBase view, string queryString, Dictionary<string, string> context, PeopleQueryMode queryMode)
// {
// EwsUtilities.ValidateParam(view, "view");
// EwsUtilities.ValidateMethodVersion(this, ExchangeVersion.Exchange2015, "FindPeople");
//
// if (context == null)
// {
// context = new Dictionary<string, string>();
// }
//
// if (queryMode == null)
// {
// queryMode = PeopleQueryMode.Auto;
// }
//
// FindPeopleRequest request = new FindPeopleRequest(this);
// request.View = view;
// request.QueryString = queryString;
// request.SearchPeopleSuggestionIndex = true;
// request.Context = context;
// request.QueryMode = queryMode;
//
// FindPeopleResponse response = request.Execute();
//
// PeopleQueryResults results = new PeopleQueryResults();
// results.Personas = response.Personas.ToList();
// results.TransactionId = response.TransactionId;
//
// return results;
// }
/// <summary>
/// Get a user's photo.
/// </summary>
/// <param name="emailAddress">The user's email address</param>
/// <param name="userPhotoSize">The desired size of the returned photo. Valid photo sizes are in UserPhotoSize</param>
/// <param name="entityTag">A photo's cache ID which will allow the caller to ensure their cached photo is up to date</param>
/// <returns>A result object containing the photo state</returns>
Future<GetUserPhotoResults> GetUserPhoto(
String emailAddress,
String userPhotoSize,
String? entityTag,
) async {
EwsUtilities.ValidateParam(emailAddress, "emailAddress");
EwsUtilities.ValidateParam(userPhotoSize, "userPhotoSize");
EwsUtilities.ValidateParamAllowNull(entityTag, "entityTag");
GetUserPhotoRequest request = GetUserPhotoRequest(this);
request.EmailAddress = emailAddress;
request.UserPhotoSize = userPhotoSize;
request.EntityTag = entityTag;
return (await request.Execute()).Results;
}