BuildSubscribeToStreamingNotificationsRequest method
Begins an asynchronous request to subscribe to streaming notifications. Calling this method results in a call to EWS.
The AsyncCallback delegate.
An object that contains state information for this request.
The Ids of the folder to subscribe to.
The event types to subscribe to.
Subscribes to streaming notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.
The event types to subscribe to.
Begins an asynchronous request to subscribe to streaming notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.
The AsyncCallback delegate.
An object that contains state information for this request.
Ends an asynchronous request to subscribe to streaming notifications in the authenticated user's mailbox. Calling this method results in a call to EWS.
An IAsyncResult that references the asynchronous request.
Builds request to subscribe to streaming notifications in the authenticated user's mailbox.
The Ids of the folder to subscribe to.
The event types to subscribe to.
Implementation
//IAsyncResult BeginSubscribeToStreamingNotifications(
// AsyncCallback callback,
// object state,
// Iterable<FolderId> folderIds,
// params EventType[] eventTypes)
// {
// EwsUtilities.ValidateMethodVersion(
// this,
// ExchangeVersion.Exchange2010_SP1,
// "BeginSubscribeToStreamingNotifications");
//
// EwsUtilities.ValidateParamCollection(folderIds, "folderIds");
//
// return this.BuildSubscribeToStreamingNotificationsRequest(folderIds, eventTypes).BeginExecute(callback, state);
// }
/// <summary>
/// Subscribes to streaming notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.
/// </summary>
/// <param name="eventTypes">The event types to subscribe to.</param>
/// <returns>A StreamingSubscription representing the new subscription.</returns>
//StreamingSubscription SubscribeToStreamingNotificationsOnAllFolders(
// params EventType[] eventTypes)
// {
// EwsUtilities.ValidateMethodVersion(
// this,
// ExchangeVersion.Exchange2010_SP1,
// "SubscribeToStreamingNotificationsOnAllFolders");
//
// return this.BuildSubscribeToStreamingNotificationsRequest(null, eventTypes).Execute()[0].Subscription;
// }
/// <summary>
/// Begins an asynchronous request to subscribe to streaming notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.
/// </summary>
/// <param name="callback">The AsyncCallback delegate.</param>
/// <param name="state">An object that contains state information for this request.</param>
/// <param name="eventTypes"></param>
/// <returns>An IAsyncResult that references the asynchronous request.</returns>
//IAsyncResult BeginSubscribeToStreamingNotificationsOnAllFolders(
// AsyncCallback callback,
// object state,
// params EventType[] eventTypes)
// {
// EwsUtilities.ValidateMethodVersion(
// this,
// ExchangeVersion.Exchange2010_SP1,
// "BeginSubscribeToStreamingNotificationsOnAllFolders");
//
// return this.BuildSubscribeToStreamingNotificationsRequest(null, eventTypes).BeginExecute(callback, state);
// }
/// <summary>
/// Ends an asynchronous request to subscribe to streaming notifications in the authenticated user's mailbox. Calling this method results in a call to EWS.
/// </summary>
/// <param name="asyncResult">An IAsyncResult that references the asynchronous request.</param>
/// <returns>A StreamingSubscription representing the new subscription.</returns>
//StreamingSubscription EndSubscribeToStreamingNotifications(IAsyncResult asyncResult)
// {
// EwsUtilities.ValidateMethodVersion(
// this,
// ExchangeVersion.Exchange2010_SP1,
// "EndSubscribeToStreamingNotifications");
//
// var request = AsyncRequestResult.ExtractServiceRequest<SubscribeToStreamingNotificationsRequest>(this, asyncResult);
//
// return request.EndExecute(asyncResult)[0].Subscription;
// }
/// <summary>
/// Builds request to subscribe to streaming notifications in the authenticated user's mailbox.
/// </summary>
/// <param name="folderIds">The Ids of the folder to subscribe to.</param>
/// <param name="eventTypes">The event types to subscribe to.</param>
/// <returns>A request to subscribe to streaming notifications in the authenticated user's mailbox. </returns>
SubscribeToStreamingNotificationsRequest
BuildSubscribeToStreamingNotificationsRequest(
Iterable<FolderId> folderIds, List<EventType> eventTypes) {
EwsUtilities.ValidateParamCollection(eventTypes, "eventTypes");
SubscribeToStreamingNotificationsRequest request =
new SubscribeToStreamingNotificationsRequest(this);
if (folderIds != null) {
request.FolderIds!.AddRangeFolderIds(folderIds);
}
request.EventTypes.addAll(eventTypes);
return request;
}