LifecycleExtensions.Subscribe Method

Definition

Overloads

Subscribe(ILifecycleObservable, Int32, ILifecycleObserver)

Creates a disposable subscription to the lifecycle.

Subscribe(ILifecycleObservable, String, Int32, Func<CancellationToken,Task>)

Creates a disposable subscription to the lifecycle.

Subscribe(ILifecycleObservable, String, Int32, Func<CancellationToken,Task>, Func<CancellationToken,Task>)

Creates a disposable subscription to the lifecycle.

Subscribe<TObserver>(ILifecycleObservable, Int32, ILifecycleObserver)

Creates a disposable subscription to the lifecycle.

Subscribe<TObserver>(ILifecycleObservable, Int32, Func<CancellationToken,Task>)

Creates a disposable subscription to the lifecycle.

Subscribe<TObserver>(ILifecycleObservable, Int32, Func<CancellationToken,Task>, Func<CancellationToken,Task>)

Creates a disposable subscription to the lifecycle.

Subscribe(ILifecycleObservable, Int32, ILifecycleObserver)

Source:
LifecycleExtensions.cs

Creates a disposable subscription to the lifecycle.

public static IDisposable Subscribe (this Orleans.ILifecycleObservable observable, int stage, Orleans.ILifecycleObserver observer);
static member Subscribe : Orleans.ILifecycleObservable * int * Orleans.ILifecycleObserver -> IDisposable
<Extension()>
Public Function Subscribe (observable As ILifecycleObservable, stage As Integer, observer As ILifecycleObserver) As IDisposable

Parameters

observable
ILifecycleObservable

The lifecycle observable.

stage
Int32

The stage to participate in.

observer
ILifecycleObserver

The observer.

Returns

A IDisposable instance which can be disposed to unsubscribe the observer from the lifecycle.

Applies to

Subscribe(ILifecycleObservable, String, Int32, Func<CancellationToken,Task>)

Source:
LifecycleExtensions.cs

Creates a disposable subscription to the lifecycle.

public static IDisposable Subscribe (this Orleans.ILifecycleObservable observable, string observerName, int stage, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> onStart);
static member Subscribe : Orleans.ILifecycleObservable * string * int * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> -> IDisposable
<Extension()>
Public Function Subscribe (observable As ILifecycleObservable, observerName As String, stage As Integer, onStart As Func(Of CancellationToken, Task)) As IDisposable

Parameters

observable
ILifecycleObservable

The lifecycle observable.

observerName
String

The name of the observer.

stage
Int32

The stage to participate in.

onStart
Func<CancellationToken,Task>

The delegate called when starting the specified lifecycle stage.

Returns

A IDisposable instance which can be disposed to unsubscribe the observer from the lifecycle.

Applies to

Subscribe(ILifecycleObservable, String, Int32, Func<CancellationToken,Task>, Func<CancellationToken,Task>)

Source:
LifecycleExtensions.cs

Creates a disposable subscription to the lifecycle.

public static IDisposable Subscribe (this Orleans.ILifecycleObservable observable, string observerName, int stage, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> onStart, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> onStop);
static member Subscribe : Orleans.ILifecycleObservable * string * int * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> -> IDisposable
<Extension()>
Public Function Subscribe (observable As ILifecycleObservable, observerName As String, stage As Integer, onStart As Func(Of CancellationToken, Task), onStop As Func(Of CancellationToken, Task)) As IDisposable

Parameters

observable
ILifecycleObservable

The lifecycle observable.

observerName
String

The name of the observer.

stage
Int32

The stage to participate in.

onStart
Func<CancellationToken,Task>

The delegate called when starting the specified lifecycle stage.

onStop
Func<CancellationToken,Task>

Teh delegate to be called when stopping the specified lifecycle stage.

Returns

A IDisposable instance which can be disposed to unsubscribe the observer from the lifecycle.

Applies to

Subscribe<TObserver>(ILifecycleObservable, Int32, ILifecycleObserver)

Source:
LifecycleExtensions.cs

Creates a disposable subscription to the lifecycle.

public static IDisposable Subscribe<TObserver> (this Orleans.ILifecycleObservable observable, int stage, Orleans.ILifecycleObserver observer);
static member Subscribe : Orleans.ILifecycleObservable * int * Orleans.ILifecycleObserver -> IDisposable
<Extension()>
Public Function Subscribe(Of TObserver) (observable As ILifecycleObservable, stage As Integer, observer As ILifecycleObserver) As IDisposable

Type Parameters

TObserver

The observer type, used for diagnostics.

Parameters

observable
ILifecycleObservable

The lifecycle observable.

stage
Int32

The stage to participate in.

observer
ILifecycleObserver

The observer.

Returns

A IDisposable instance which can be disposed to unsubscribe the observer from the lifecycle.

Applies to

Subscribe<TObserver>(ILifecycleObservable, Int32, Func<CancellationToken,Task>)

Source:
LifecycleExtensions.cs

Creates a disposable subscription to the lifecycle.

public static IDisposable Subscribe<TObserver> (this Orleans.ILifecycleObservable observable, int stage, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> onStart);
static member Subscribe : Orleans.ILifecycleObservable * int * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> -> IDisposable
<Extension()>
Public Function Subscribe(Of TObserver) (observable As ILifecycleObservable, stage As Integer, onStart As Func(Of CancellationToken, Task)) As IDisposable

Type Parameters

TObserver

The observer type, used for diagnostics.

Parameters

observable
ILifecycleObservable

The lifecycle observable.

stage
Int32

The stage to participate in.

onStart
Func<CancellationToken,Task>

The delegate called when starting the specified lifecycle stage.

Returns

A IDisposable instance which can be disposed to unsubscribe the observer from the lifecycle.

Applies to

Subscribe<TObserver>(ILifecycleObservable, Int32, Func<CancellationToken,Task>, Func<CancellationToken,Task>)

Source:
LifecycleExtensions.cs

Creates a disposable subscription to the lifecycle.

public static IDisposable Subscribe<TObserver> (this Orleans.ILifecycleObservable observable, int stage, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> onStart, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> onStop);
static member Subscribe : Orleans.ILifecycleObservable * int * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> -> IDisposable
<Extension()>
Public Function Subscribe(Of TObserver) (observable As ILifecycleObservable, stage As Integer, onStart As Func(Of CancellationToken, Task), onStop As Func(Of CancellationToken, Task)) As IDisposable

Type Parameters

TObserver

The observer type, used for diagnostics.

Parameters

observable
ILifecycleObservable

The lifecycle observable.

stage
Int32

The stage to participate in.

onStart
Func<CancellationToken,Task>

The delegate called when starting the specified lifecycle stage.

onStop
Func<CancellationToken,Task>

Teh delegate to be called when stopping the specified lifecycle stage.

Returns

A IDisposable instance which can be disposed to unsubscribe the observer from the lifecycle.

Applies to