Example #1
0
 /// <summary>
 /// Creates a disposable subscription to the lifecycle.
 /// </summary>
 /// <param name="observable">The lifecycle observable.</param>
 /// <param name="stage">The stage to participate in.</param>
 /// <param name="observer">The observer.</param>
 /// <returns>A <see cref="IDisposable"/> instance which can be disposed to unsubscribe the observer from the lifecycle.</returns>
 public static IDisposable Subscribe(this ILifecycleObservable observable, int stage, ILifecycleObserver observer)
 {
     return(observable.Subscribe(observer.GetType().FullName, stage, observer));
 }