InternalGetAttachments method
Future<ServiceResponseCollection<GetAttachmentResponse> >
InternalGetAttachments(
- Iterable<
Attachment> attachments, - BodyType? bodyType,
- Iterable<
PropertyDefinitionBase> ? additionalProperties, - ServiceErrorHandling errorHandling,
Implementation
//ServiceResponseCollection<MarkAsJunkResponse> MarkAsJunk(Iterable<ItemId> itemIds, bool isJunk, bool moveItem)
// {
// MarkAsJunkRequest request = new MarkAsJunkRequest(this, ServiceErrorHandling.ReturnErrors);
// request.ItemIds.AddRange(itemIds);
// request.IsJunk = isJunk;
// request.MoveItem = moveItem;
// return request.Execute();
// }
/// <summary>
/// This method is for search scenarios. Retrieves a set of personas satisfying the specified search conditions.
/// </summary>
/// <param name="folderId">Id 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(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>
//GetUserPhotoResults GetUserPhoto(string emailAddress, string userPhotoSize, string entityTag)
// {
// EwsUtilities.ValidateParam(emailAddress, "emailAddress");
// EwsUtilities.ValidateParam(userPhotoSize, "userPhotoSize");
// EwsUtilities.ValidateParamAllowNull(entityTag, "entityTag");
//
// GetUserPhotoRequest request = new GetUserPhotoRequest(this);
//
// request.EmailAddress = emailAddress;
// request.UserPhotoSize = userPhotoSize;
// request.EntityTag = entityTag;
//
// return request.Execute().Results;
// }
/// <summary>
/// Set a user's photo.
/// </summary>
/// <param name="emailAddress">The user's email address</param>
/// <param name="photo">The photo to set</param>
/// <returns>A result object</returns>
//SetUserPhotoResults SetUserPhoto(string emailAddress, Uint8List photo)
// {
// EwsUtilities.ValidateParam(emailAddress, "emailAddress");
// EwsUtilities.ValidateParam(photo, "photo");
//
// SetUserPhotoRequest request = new SetUserPhotoRequest(this);
//
// request.EmailAddress = emailAddress;
// request.Photo = photo;
//
// return request.Execute().Results;
// }
/// <summary>
/// Begins an async request for a user photo
/// </summary>
/// <param name="callback">An AsyncCallback delegate</param>
/// <param name="state">An object that contains state information for this request</param>
/// <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>An IAsyncResult that references the asynchronous request.</returns>
//IAsyncResult BeginGetUserPhoto(
// AsyncCallback callback,
// object state,
// string emailAddress,
// string userPhotoSize,
// string entityTag)
// {
// EwsUtilities.ValidateParam(emailAddress, "emailAddress");
// EwsUtilities.ValidateParam(userPhotoSize, "userPhotoSize");
// EwsUtilities.ValidateParamAllowNull(entityTag, "entityTag");
//
// GetUserPhotoRequest request = new GetUserPhotoRequest(this);
//
// request.EmailAddress = emailAddress;
// request.UserPhotoSize = userPhotoSize;
// request.EntityTag = entityTag;
//
// return request.BeginExecute(callback, state);
// }
/// <summary>
/// Ends an async request for a user's photo
/// </summary>
/// <param name="asyncResult">An IAsyncResult that references the asynchronous request.</param>
/// <returns>A result object containing the photo state</returns>
//GetUserPhotoResults EndGetUserPhoto(IAsyncResult asyncResult)
// {
// GetUserPhotoRequest request = AsyncRequestResult.ExtractServiceRequest<GetUserPhotoRequest>(this, asyncResult);
// return request.EndExecute(asyncResult).Results;
// }
/// <summary>
/// This method is for retreiving people insight for given email addresses
/// </summary>
/// <param name="emailAddresses">Specified eamiladdresses to retrieve</param>
/// <returns>The collection of Person objects containing the insight info</returns>
//Collection<Person> GetPeopleInsights(Iterable<string> emailAddresses)
// {
// GetPeopleInsightsRequest request = new GetPeopleInsightsRequest(this);
// request.Emailaddresses.AddRange(emailAddresses);
//
// return request.Execute().People;
// }
/// <summary>
/// Gets an attachment.
/// </summary>
/// <param name="attachments">The attachments.</param>
/// <param name="bodyType">Type of the body.</param>
/// <param name="additionalProperties">The additional properties.</param>
/// <param name="errorHandling">Type of error handling to perform.</param>
/// <returns>Service response collection.</returns>
Future<ServiceResponseCollection<GetAttachmentResponse>>
InternalGetAttachments(
Iterable<Attachment> attachments,
BodyType? bodyType,
Iterable<PropertyDefinitionBase>? additionalProperties,
ServiceErrorHandling errorHandling) {
GetAttachmentRequest request =
new GetAttachmentRequest(this, errorHandling);
request.Attachments.addAll(attachments);
request.BodyType = bodyType;
if (additionalProperties != null) {
request.AdditionalProperties.addAll(additionalProperties);
}
return request.Execute();
}