Source/Deployer.Core/Utils/SafeObservableExtensions.cs
/// <summary>
/// Subscribes an element handler, an exception handler and a completion handler to the specified <paramref name="source"/>, 
/// re-routing synchronous exceptions during invocation of the <strong>Subscribe</strong> method to the observer's <strong>OnError</strong> channel.
/// This method is typically used when writing query operators.
/// </summary>
/// <typeparam name="T">The type of the elements in the source sequence.</typeparam>
/// <param name="source">Observable sequence to subscribe to.</param>
/// <param name="onNext">Action to invoke for each element in the observable sequence.</param>
/// <param name="onError">Action to invoke upon exceptional termination of the observable sequence.</param>
/// <param name="onCompleted">Action to invoke upon graceful termination of the observable sequence.</param>
/// <returns><see cref="IDisposable"/> object used to unsubscribe from the observable sequence.</returns>
Subscribes an element handler, an exception handler and a completion handler to the specified ,
re-routing synchronous exceptions during invocation of the SubscribeOnError
Subscribes an element handler an exception handler and a completion handler to the specified re - routing synchronous exceptions during invocation of the SubscribeOnError
[EditorBrowsable(EditorBrowsableState.Advanced)]
        public static IDisposable SubscribeSafe<T>(this IObservable<T> source, Action<T> onNext,
            Action<Exception> onError, Action onCompleted)
        {
            Contract.Requires(source != null);
            Contract.Requires(onNext != null);
            Contract.Requires(onError != null);
            Contract.Requires(onCompleted != null);
            Contract.Ensures(Contract.Result<IDisposable>() != null);
            return source.SubscribeSafe(Observer.Create<T>(onNext, onError, onCompleted));
        }
[ EditorBrowsable ( EditorBrowsableState . Advanced ) ] public static IDisposable SubscribeSafe < T > ( this IObservable < T > source , Action < T > onNext , Action < Exception > onError , Action onCompleted ) { Contract . Requires ( source != null ) ; Contract . Requires ( onNext != null ) ; Contract . Requires ( onError != null ) ; Contract . Requires ( onCompleted != null ) ; Contract . Ensures ( Contract . Result < IDisposable > ( ) != null ) ; return source . SubscribeSafe ( Observer . Create < T > ( onNext , onError , onCompleted ) ) ; }
Subscribes an element handler, an exception handler and a completion handler to the specified ,
re-routing synchronous exceptions during invocation of the SubscribeOnError
Subscribes an element handler an exception handler and a completion handler to the specified re - routing synchronous exceptions during invocation of the SubscribeOnError
object used to unsubscribe from the observable sequence.
object used to unsubscribe from the observable sequence .
IObservable<T>
this
onNext
Action<T>
Action to invoke for each element in the observable sequence.
Action to invoke for each element in the observable sequence .
onError
Action<Exception>
Action to invoke upon exceptional termination of the observable sequence.
Action to invoke upon exceptional termination of the observable sequence .
onCompleted
Action
Action to invoke upon graceful termination of the observable sequence.
Action to invoke upon graceful termination of the observable sequence .
source
Observable sequence to subscribe to.
Observable sequence to subscribe to .
typeparam
The type of the elements in the source sequence.
The type of the elements in the source sequence .