Edit

Share via


AsyncBatchObservableExtensions.SubscribeAsync Method

Definition

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>)

Source:
AsyncBatchObservableExtensions.cs

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

obs
IAsyncBatchObservable<T>

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>)

Source:
AsyncBatchObservableExtensions.cs

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

obs
IAsyncBatchObservable<T>

The Observable object.

onNextAsync
Func<IList<SequentialItem<T>>,Task>

Delegate that is called for IAsyncBatchObserver.OnNextAsync.

onErrorAsync
Func<Exception,Task>

Delegate that is called for IAsyncBatchObserver.OnErrorAsync.

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>)

Source:
AsyncBatchObservableExtensions.cs

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

obs
IAsyncBatchObservable<T>

The Observable object.

onNextAsync
Func<IList<SequentialItem<T>>,Task>

Delegate that is called for IAsyncBatchObserver.OnNextAsync.

onCompletedAsync
Func<Task>

Delegate that is called for IAsyncBatchObserver.OnCompletedAsync.

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>)

Source:
AsyncBatchObservableExtensions.cs

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

obs
IAsyncBatchObservable<T>

The Observable object.

onNextAsync
Func<IList<SequentialItem<T>>,Task>

Delegate that is called for IAsyncBatchObserver.OnNextAsync.

onErrorAsync
Func<Exception,Task>

Delegate that is called for IAsyncBatchObserver.OnErrorAsync.

onCompletedAsync
Func<Task>

Delegate that is called for IAsyncBatchObserver.OnCompletedAsync.

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