LifecycleSubject
class
Namespace: Orleans
Provides functionality for observing a lifecycle.
public abstract class LifecycleSubject : ILifecycleObservable, ILifecycleObserver, ILifecycleSubjectRemarks
- Single use, does not support multiple start/stop cycles.
- Once started, no other observers can be subscribed.
- OnStart starts stages in order until first failure or cancellation.
- OnStop stops states in reverse order starting from highest started stage.
- OnStop stops all stages regardless of errors even if canceled.
Methods
OnStart(CancellationToken)Handle start notifications.OnStop(CancellationToken)Handle stop notifications.Subscribe(string, int, ILifecycleObserver)Subscribe for notification when a stage is reached while starting or stopping.
