BuildUnsubscribeRequest method

UnsubscribeRequest BuildUnsubscribeRequest(
  1. String? subscriptionId
)
Begins an asynchronous request to unsubscribe from a subscription. Calling this method results in a call to EWS. The AsyncCallback delegate. An object that contains state information for this request. The Id of the pull subscription to unsubscribe from. Ends an asynchronous request to unsubscribe from a subscription. An IAsyncResult that references the asynchronous request. Buids a request to unsubscribe from a subscription. The Id of the subscription for which to get the events.

Implementation

//        IAsyncResult BeginUnsubscribe(
//            AsyncCallback callback,
//            object state,
//            string subscriptionId)
//        {
//            return this.BuildUnsubscribeRequest(subscriptionId).BeginExecute(callback, state);
//        }

/// <summary>
/// Ends an asynchronous request to unsubscribe from a subscription.
/// </summary>
/// <param name="asyncResult">An IAsyncResult that references the asynchronous request.</param>
//        void EndUnsubscribe(IAsyncResult asyncResult)
//        {
//            var request = AsyncRequestResult.ExtractServiceRequest<UnsubscribeRequest>(this, asyncResult);
//
//            request.EndExecute(asyncResult);
//        }

/// <summary>
/// Buids a request to unsubscribe from a subscription.
/// </summary>
/// <param name="subscriptionId">The Id of the subscription for which to get the events.</param>
/// <returns>A request to unsubscribe from a subscription.</returns>
UnsubscribeRequest BuildUnsubscribeRequest(String? subscriptionId) {
  EwsUtilities.ValidateParam(subscriptionId, "subscriptionId");

  UnsubscribeRequest request = new UnsubscribeRequest(this);

  request.SubscriptionId = subscriptionId;

  return request;
}