Unsubscribe method
Begins an asynchronous request to obtain a collection of events that occurred on the subscribed
folders since the point in time defined by the Watermark property.
The AsyncCallback delegate.
An object that contains state information for this request.
Ends an asynchronous request to obtain a collection of events that occurred on the subscribed
folders since the point in time defined by the Watermark property. When EndGetEvents succeeds, Watermark is updated.
An IAsyncResult that references the asynchronous request.
Unsubscribes from the pull subscription.
Implementation
// IAsyncResult BeginGetEvents(AsyncCallback callback, object state)
// {
// return this.Service.BeginGetEvents(callback, state, this.Id, this.Watermark);
// }
/// <summary>
/// Ends an asynchronous request to obtain a collection of events that occurred on the subscribed
/// folders since the point in time defined by the Watermark property. When EndGetEvents succeeds, Watermark is updated.
/// </summary>
/// <param name="asyncResult">An IAsyncResult that references the asynchronous request.</param>
/// <returns>Returns a collection of events that occurred since the last watermark.</returns>
// GetEventsResults EndGetEvents(IAsyncResult asyncResult)
// {
// GetEventsResults results = this.Service.EndGetEvents(asyncResult);
//
// this.Watermark = results.NewWatermark;
// this.moreEventsAvailable = results.MoreEventsAvailable;
//
// return results;
// }
/// <summary>
/// Unsubscribes from the pull subscription.
/// </summary>
Future<void> Unsubscribe() async {
await Service.BuildUnsubscribeRequest(Id).Execute();
}