Unsubscribe method

void Unsubscribe(
  1. String? subscriptionId
)
Expands a group by retrieving a list of its members. Calling this method results in a call to EWS. The e-mail address of the group. Expands a group by retrieving a list of its members. Calling this method results in a call to EWS. The Id of the group to expand. Expands a group by retrieving a list of its members. Calling this method results in a call to EWS. The SMTP address of the group to expand. Expands a group by retrieving a list of its members. Calling this method results in a call to EWS. The SMTP address of the group to expand. The routing type of the address of the group to expand. Get the password expiration date The e-mail address of the user. Subscribes to pull notifications. Calling this method results in a call to EWS. The Ids of the folder to subscribe to. The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440. An optional watermark representing a previously opened subscription. The event types to subscribe to. Begins an asynchronous request to subscribes to pull 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 timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440. An optional watermark representing a previously opened subscription. The event types to subscribe to. Subscribes to pull notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS. The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440. An optional watermark representing a previously opened subscription. The event types to subscribe to. Begins an asynchronous request to subscribe to pull 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. The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440. An optional watermark representing a previously opened subscription. The event types to subscribe to.> Ends an asynchronous request to subscribe to pull notifications in the authenticated user's mailbox. An IAsyncResult that references the asynchronous request. Builds a request to subscribe to pull notifications in the authenticated user's mailbox. The Ids of the folder to subscribe to. The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440. An optional watermark representing a previously opened subscription. The event types to subscribe to. Unsubscribes from a subscription. Calling this method results in a call to EWS. The Id of the pull subscription to unsubscribe from.

Implementation

//ExpandGroupResults ExpandGroup(EmailAddress emailAddress)
//        {
//            EwsUtilities.ValidateParam(emailAddress, "emailAddress");
//
//            ExpandGroupRequest request = new ExpandGroupRequest(this);
//
//            request.EmailAddress = emailAddress;
//
//            return request.Execute()[0].Members;
//        }

/// <summary>
/// Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.
/// </summary>
/// <param name="groupId">The Id of the group to expand.</param>
/// <returns>An ExpandGroupResults containing the members of the group.</returns>
//ExpandGroupResults ExpandGroup(ItemId groupId)
//        {
//            EwsUtilities.ValidateParam(groupId, "groupId");
//
//            EmailAddress emailAddress = new EmailAddress();
//            emailAddress.Id = groupId;
//
//            return this.ExpandGroup(emailAddress);
//        }

/// <summary>
/// Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.
/// </summary>
/// <param name="smtpAddress">The SMTP address of the group to expand.</param>
/// <returns>An ExpandGroupResults containing the members of the group.</returns>
//ExpandGroupResults ExpandGroup(string smtpAddress)
//        {
//            EwsUtilities.ValidateParam(smtpAddress, "smtpAddress");
//
//            return this.ExpandGroup(new EmailAddress(smtpAddress));
//        }

/// <summary>
/// Expands a group by retrieving a list of its members. Calling this method results in a call to EWS.
/// </summary>
/// <param name="address">The SMTP address of the group to expand.</param>
/// <param name="routingType">The routing type of the address of the group to expand.</param>
/// <returns>An ExpandGroupResults containing the members of the group.</returns>
//ExpandGroupResults ExpandGroup(string address, string routingType)
//        {
//            EwsUtilities.ValidateParam(address, "address");
//            EwsUtilities.ValidateParam(routingType, "routingType");
//
//            EmailAddress emailAddress = new EmailAddress(address);
//            emailAddress.RoutingType = routingType;
//
//            return this.ExpandGroup(emailAddress);
//        }

/// <summary>
/// Get the password expiration date
/// </summary>
/// <param name="mailboxSmtpAddress">The e-mail address of the user.</param>
/// <returns>The password expiration date.</returns>
//DateTime? GetPasswordExpirationDate(string mailboxSmtpAddress)
//        {
//            GetPasswordExpirationDateRequest request = new GetPasswordExpirationDateRequest(this);
//            request.MailboxSmtpAddress = mailboxSmtpAddress;
//
//            return request.Execute().PasswordExpirationDate;
//        }

/// <summary>
/// Subscribes to pull notifications. Calling this method results in a call to EWS.
/// </summary>
/// <param name="folderIds">The Ids of the folder to subscribe to.</param>
/// <param name="timeout">The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.</param>
/// <param name="watermark">An optional watermark representing a previously opened subscription.</param>
/// <param name="eventTypes">The event types to subscribe to.</param>
/// <returns>A PullSubscription representing the new subscription.</returns>
//PullSubscription SubscribeToPullNotifications(
//            Iterable<FolderId> folderIds,
//            int timeout,
//            string watermark,
//            params EventType[] eventTypes)
//        {
//            EwsUtilities.ValidateParamCollection(folderIds, "folderIds");
//
//            return this.BuildSubscribeToPullNotificationsRequest(
//                 folderIds,
//                 timeout,
//                 watermark,
//                 eventTypes).Execute()[0].Subscription;
//        }

/// <summary>
/// Begins an asynchronous request to subscribes to pull notifications. 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="folderIds">The Ids of the folder to subscribe to.</param>
/// <param name="timeout">The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.</param>
/// <param name="watermark">An optional watermark representing a previously opened subscription.</param>
/// <param name="eventTypes">The event types to subscribe to.</param>
/// <returns>An IAsyncResult that references the asynchronous request.</returns>
//IAsyncResult BeginSubscribeToPullNotifications(
//            AsyncCallback callback,
//            object state,
//            Iterable<FolderId> folderIds,
//            int timeout,
//            string watermark,
//            params EventType[] eventTypes)
//        {
//            EwsUtilities.ValidateParamCollection(folderIds, "folderIds");
//
//            return this.BuildSubscribeToPullNotificationsRequest(
//                folderIds,
//                timeout,
//                watermark,
//                eventTypes).BeginExecute(callback, state);
//        }

/// <summary>
/// Subscribes to pull notifications on all folders in the authenticated user's mailbox. Calling this method results in a call to EWS.
/// </summary>
/// <param name="timeout">The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.</param>
/// <param name="watermark">An optional watermark representing a previously opened subscription.</param>
/// <param name="eventTypes">The event types to subscribe to.</param>
/// <returns>A PullSubscription representing the new subscription.</returns>
//PullSubscription SubscribeToPullNotificationsOnAllFolders(
//            int timeout,
//            string watermark,
//            params EventType[] eventTypes)
//        {
//            EwsUtilities.ValidateMethodVersion(
//                this,
//                ExchangeVersion.Exchange2010,
//                "SubscribeToPullNotificationsOnAllFolders");
//
//            return this.BuildSubscribeToPullNotificationsRequest(
//                null,
//                timeout,
//                watermark,
//                eventTypes).Execute()[0].Subscription;
//        }

/// <summary>
/// Begins an asynchronous request to subscribe to pull 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="timeout">The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.</param>
/// <param name="watermark">An optional watermark representing a previously opened subscription.</param>
/// <param name="eventTypes">The event types to subscribe to.</param>>
/// <returns>An IAsyncResult that references the asynchronous request.</returns>
//IAsyncResult BeginSubscribeToPullNotificationsOnAllFolders(
//            AsyncCallback callback,
//            object state,
//            int timeout,
//            string watermark,
//            params EventType[] eventTypes)
//        {
//            EwsUtilities.ValidateMethodVersion(
//                this,
//                ExchangeVersion.Exchange2010,
//                "BeginSubscribeToPullNotificationsOnAllFolders");
//
//            return this.BuildSubscribeToPullNotificationsRequest(
//                null,
//                timeout,
//                watermark,
//                eventTypes).BeginExecute(callback, state);
//        }

/// <summary>
/// Ends an asynchronous request to subscribe to pull notifications in the authenticated user's mailbox.
/// </summary>
/// <param name="asyncResult">An IAsyncResult that references the asynchronous request.</param>
/// <returns>A PullSubscription representing the new subscription.</returns>
//PullSubscription EndSubscribeToPullNotifications(IAsyncResult asyncResult)
//        {
//            var request = AsyncRequestResult.ExtractServiceRequest<SubscribeToPullNotificationsRequest>(this, asyncResult);
//
//            return request.EndExecute(asyncResult)[0].Subscription;
//        }

/// <summary>
/// Builds a request to subscribe to pull notifications in the authenticated user's mailbox.
/// </summary>
/// <param name="folderIds">The Ids of the folder to subscribe to.</param>
/// <param name="timeout">The timeout, in minutes, after which the subscription expires. Timeout must be between 1 and 1440.</param>
/// <param name="watermark">An optional watermark representing a previously opened subscription.</param>
/// <param name="eventTypes">The event types to subscribe to.</param>
/// <returns>A request to subscribe to pull notifications in the authenticated user's mailbox. </returns>
//SubscribeToPullNotificationsRequest BuildSubscribeToPullNotificationsRequest(
//            Iterable<FolderId> folderIds,
//            int timeout,
//            string watermark,
//            EventType[] eventTypes)
//        {
//            if (timeout < 1 || timeout > 1440)
//            {
//                throw new ArgumentOutOfRangeException("timeout", Strings.TimeoutMustBeBetween1And1440);
//            }
//
//            EwsUtilities.ValidateParamCollection(eventTypes, "eventTypes");
//
//            SubscribeToPullNotificationsRequest request = new SubscribeToPullNotificationsRequest(this);
//
//            if (folderIds != null)
//            {
//                request.FolderIds.AddRange(folderIds);
//            }
//
//            request.Timeout = timeout;
//            request.EventTypes.AddRange(eventTypes);
//            request.Watermark = watermark;
//
//            return request;
//        }

/// <summary>
/// Unsubscribes from a subscription. Calling this method results in a call to EWS.
/// </summary>
/// <param name="subscriptionId">The Id of the pull subscription to unsubscribe from.</param>
void Unsubscribe(String? subscriptionId) {
  this.BuildUnsubscribeRequest(subscriptionId).Execute();
}