AsyncBatchObservableExtensions.SubscribeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>) |
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver. |
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Exception,Task>) |
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver. |
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Task>) |
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver. |
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Exception,Task>, Func<Task>) |
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver. |
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>)
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.
public static System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<T>> SubscribeAsync<T> (this Orleans.Streams.IAsyncBatchObservable<T> obs, Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<T>>,System.Threading.Tasks.Task> onNextAsync);
static member SubscribeAsync : Orleans.Streams.IAsyncBatchObservable<'T> * Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<'T>>, System.Threading.Tasks.Task> -> System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<'T>>
<Extension()>
Public Function SubscribeAsync(Of T) (obs As IAsyncBatchObservable(Of T), onNextAsync As Func(Of IList(Of SequentialItem(Of T)), Task)) As Task(Of StreamSubscriptionHandle(Of T))
Type Parameters
- T
The type of object produced by the observable.
Parameters
The Observable object.
- onNextAsync
- Func<IList<SequentialItem<T>>,Task>
Delegate that is called for IAsyncBatchObserver.OnNextAsync.
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.
Applies to
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Exception,Task>)
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.
public static System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<T>> SubscribeAsync<T> (this Orleans.Streams.IAsyncBatchObservable<T> obs, Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<T>>,System.Threading.Tasks.Task> onNextAsync, Func<Exception,System.Threading.Tasks.Task> onErrorAsync);
static member SubscribeAsync : Orleans.Streams.IAsyncBatchObservable<'T> * Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<'T>>, System.Threading.Tasks.Task> * Func<Exception, System.Threading.Tasks.Task> -> System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<'T>>
<Extension()>
Public Function SubscribeAsync(Of T) (obs As IAsyncBatchObservable(Of T), onNextAsync As Func(Of IList(Of SequentialItem(Of T)), Task), onErrorAsync As Func(Of Exception, Task)) As Task(Of StreamSubscriptionHandle(Of T))
Type Parameters
- T
The type of object produced by the observable.
Parameters
The Observable object.
- onNextAsync
- Func<IList<SequentialItem<T>>,Task>
Delegate that is called for IAsyncBatchObserver.OnNextAsync.
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.
Applies to
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Task>)
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.
public static System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<T>> SubscribeAsync<T> (this Orleans.Streams.IAsyncBatchObservable<T> obs, Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<T>>,System.Threading.Tasks.Task> onNextAsync, Func<System.Threading.Tasks.Task> onCompletedAsync);
static member SubscribeAsync : Orleans.Streams.IAsyncBatchObservable<'T> * Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<'T>>, System.Threading.Tasks.Task> * Func<System.Threading.Tasks.Task> -> System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<'T>>
<Extension()>
Public Function SubscribeAsync(Of T) (obs As IAsyncBatchObservable(Of T), onNextAsync As Func(Of IList(Of SequentialItem(Of T)), Task), onCompletedAsync As Func(Of Task)) As Task(Of StreamSubscriptionHandle(Of T))
Type Parameters
- T
The type of object produced by the observable.
Parameters
The Observable object.
- onNextAsync
- Func<IList<SequentialItem<T>>,Task>
Delegate that is called for IAsyncBatchObserver.OnNextAsync.
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.
Applies to
SubscribeAsync<T>(IAsyncBatchObservable<T>, Func<IList<SequentialItem<T>>,Task>, Func<Exception,Task>, Func<Task>)
Subscribe a consumer to this observable using delegates. This method is a helper for the IAsyncBatchObservable.SubscribeAsync allowing the subscribing class to inline the handler methods instead of requiring an instance of IAsyncBatchObserver.
public static System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<T>> SubscribeAsync<T> (this Orleans.Streams.IAsyncBatchObservable<T> obs, Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<T>>,System.Threading.Tasks.Task> onNextAsync, Func<Exception,System.Threading.Tasks.Task> onErrorAsync, Func<System.Threading.Tasks.Task> onCompletedAsync);
static member SubscribeAsync : Orleans.Streams.IAsyncBatchObservable<'T> * Func<System.Collections.Generic.IList<Orleans.Streams.SequentialItem<'T>>, System.Threading.Tasks.Task> * Func<Exception, System.Threading.Tasks.Task> * Func<System.Threading.Tasks.Task> -> System.Threading.Tasks.Task<Orleans.Streams.StreamSubscriptionHandle<'T>>
<Extension()>
Public Function SubscribeAsync(Of T) (obs As IAsyncBatchObservable(Of T), onNextAsync As Func(Of IList(Of SequentialItem(Of T)), Task), onErrorAsync As Func(Of Exception, Task), onCompletedAsync As Func(Of Task)) As Task(Of StreamSubscriptionHandle(Of T))
Type Parameters
- T
The type of object produced by the observable.
Parameters
The Observable object.
- onNextAsync
- Func<IList<SequentialItem<T>>,Task>
Delegate that is called for IAsyncBatchObserver.OnNextAsync.
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.