public override bool Equals(StreamSubscriptionHandle <T> other) { var o = other as StreamSubscriptionHandleImpl <T>; return(o != null && SubscriptionId.Equals(o.SubscriptionId)); }
public Task OnSubscribed(StreamSubscriptionHandle <T> handle) { return(this.observer.OnSubscribed(handle)); }
public abstract bool Equals(StreamSubscriptionHandle <T> other);
/// <summary> /// <exception cref="ArgumentException">Thrown if the supplied stream filter function is not suitable. /// Usually this is because it is not a static method. </exception> /// </summary> /// <typeparam name="T">The type of object produced by the observable.</typeparam> /// <param name="handle">The subscription handle.</param> /// <param name="onNextAsync">Delegate that is called for IAsyncObserver.OnNextAsync.</param> /// <param name="token">The stream sequence to be used as an offset to start the subscription from.</param> /// <returns>A promise for a StreamSubscriptionHandle that represents the subscription. /// The consumer may unsubscribe by using this handle. /// The subscription remains active for as long as it is not explicitly unsubscribed. /// </returns> public static Task <StreamSubscriptionHandle <T> > ResumeAsync <T>(this StreamSubscriptionHandle <T> handle, Func <T, StreamSequenceToken, Task> onNextAsync, StreamSequenceToken token = null) { return(handle.ResumeAsync(onNextAsync, DefaultOnError, DefaultOnCompleted, token)); }
// Used in test. internal bool InternalRemoveObserver(StreamSubscriptionHandle <T> handle) { return(myExtension != null && myExtension.RemoveObserver(((StreamSubscriptionHandleImpl <T>)handle).SubscriptionId)); }
internal Task UnsubscribeAsync(StreamSubscriptionHandle <T> handle) { return(GetConsumerInterface().UnsubscribeAsync(handle)); }