Skip to content

,System.Action{--0})} ,System.Action{--0},System.Action)} ,System.Action{--0},System.Action{System.Exception})} ,System.Action{--0},System.Action{System.Exception},System.Action)} ,System.IObserver{--0})}

Observable.Do(IObservable, Action) method

Defined in

Type: Observable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0

Overloads

  • 1. public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext)
  • 2. public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext, Action onCompleted)
  • 3. public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext, Action<Exception> onError)
  • 4. public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext, Action<Exception> onError, Action onCompleted)
  • 5. public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, IObserver<TSource> observer)

1. Overload

public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
onNextAction--

Returns: IObservable

2. Overload

public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext, Action onCompleted)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
onNextAction--
onCompletedAction--

Returns: IObservable

3. Overload

public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext, Action<Exception> onError)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
onNextAction--
onErrorAction--

Returns: IObservable

4. Overload

public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, Action<TSource> onNext, Action<Exception> onError, Action onCompleted)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
onNextAction--
onErrorAction--
onCompletedAction--

Returns: IObservable

5. Overload

public static IObservable<TSource> Do<TSource>(this IObservable<TSource> source, IObserver<TSource> observer)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
observerIObserver--

Returns: IObservable