Skip to content

},System.Action{--0})} },System.Action{--0},System.Action{System.Exception},System.Action)} },System.Action{--1})} },System.Action{--1},System.Action{System.Exception},System.Action)} },System.Func{ReactiveUI.IReactiveCommand{--0,--1},System.IObservable{--2}},System.Action{--2})} },System.Func{ReactiveUI.IReactiveCommand{--0,--1},System.IObservable{--2}},System.Action{--2},System.Action{System.Exception},System.Action)} ,System.Func{--0,System.IObservable{--1}},System.Action{--1})} ,System.Func{--0,System.IObservable{--1}},System.Action{--1},System.Action{System.Exception},System.Action)}

SwitchSubscribeMixins.SwitchSubscribe(IObservable?>, Action) method

Defined in

Type: SwitchSubscribeMixins Namespace: ReactiveUI.Reactive Assembly: ReactiveUI.Reactive.dll

Applies to

net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471

Overloads

  • 1. public static IDisposable SwitchSubscribe<T>(this IObservable<IObservable<T>?> source, Action<T> onNext) where T : notnull
  • 2. public static IDisposable SwitchSubscribe<T>(this IObservable<IObservable<T>?> source, Action<T> onNext, Action<Exception> onError, Action onCompleted) where T : notnull
  • 3. public static IDisposable SwitchSubscribe<TParam, TResult>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Action<TResult> onNext)
  • 4. public static IDisposable SwitchSubscribe<TParam, TResult>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Action<TResult> onNext, Action<Exception> onError, Action onCompleted) where TParam : notnull where TResult : notnull
  • 5. public static IDisposable SwitchSubscribe<TParam, TResult, TValue>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Func<IReactiveCommand<TParam, TResult>, IObservable<TValue>> selector, Action<TValue> onNext)
  • 6. public static IDisposable SwitchSubscribe<TParam, TResult, TValue>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Func<IReactiveCommand<TParam, TResult>, IObservable<TValue>> selector, Action<TValue> onNext, Action<Exception> onError, Action onCompleted) where TParam : notnull where TResult : notnull where TValue : notnull
  • 7. public static IDisposable SwitchSubscribe<TSource, TResult>(this IObservable<TSource?> source, Func<TSource, IObservable<TResult>> selector, Action<TResult> onNext)
  • 8. public static IDisposable SwitchSubscribe<TSource, TResult>(this IObservable<TSource?> source, Func<TSource, IObservable<TResult>> selector, Action<TResult> onNext, Action<Exception> onError, Action onCompleted) where TSource : notnull where TResult : notnull

1. Overload

public static IDisposable SwitchSubscribe<T>(this IObservable<IObservable<T>?> source, Action<T> onNext) where T : notnull

View source

Type parameters

NameDescription
T--

Parameters

NameTypeDescription
sourceIObservable?>--
onNextAction--

Returns: IDisposable

2. Overload

public static IDisposable SwitchSubscribe<T>(this IObservable<IObservable<T>?> source, Action<T> onNext, Action<Exception> onError, Action onCompleted) where T : notnull

View source

Type parameters

NameDescription
T--

Parameters

NameTypeDescription
sourceIObservable?>--
onNextAction--
onErrorAction--
onCompletedAction--

Returns: IDisposable

3. Overload

public static IDisposable SwitchSubscribe<TParam, TResult>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Action<TResult> onNext)

View source

Type parameters

NameDescription
TParam--
TResult--

Parameters

NameTypeDescription
sourceIObservable?>--
onNextAction--

Returns: IDisposable

4. Overload

public static IDisposable SwitchSubscribe<TParam, TResult>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Action<TResult> onNext, Action<Exception> onError, Action onCompleted) where TParam : notnull where TResult : notnull

View source

Type parameters

NameDescription
TParam--
TResult--

Parameters

NameTypeDescription
sourceIObservable?>--
onNextAction--
onErrorAction--
onCompletedAction--

Returns: IDisposable

5. Overload

public static IDisposable SwitchSubscribe<TParam, TResult, TValue>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Func<IReactiveCommand<TParam, TResult>, IObservable<TValue>> selector, Action<TValue> onNext)

View source

Type parameters

NameDescription
TParam--
TResult--
TValue--

Parameters

NameTypeDescription
sourceIObservable?>--
selectorFunc, IObservable>--
onNextAction--

Returns: IDisposable

6. Overload

public static IDisposable SwitchSubscribe<TParam, TResult, TValue>(this IObservable<IReactiveCommand<TParam, TResult>?> source, Func<IReactiveCommand<TParam, TResult>, IObservable<TValue>> selector, Action<TValue> onNext, Action<Exception> onError, Action onCompleted) where TParam : notnull where TResult : notnull where TValue : notnull

View source

Type parameters

NameDescription
TParam--
TResult--
TValue--

Parameters

NameTypeDescription
sourceIObservable?>--
selectorFunc, IObservable>--
onNextAction--
onErrorAction--
onCompletedAction--

Returns: IDisposable

7. Overload

public static IDisposable SwitchSubscribe<TSource, TResult>(this IObservable<TSource?> source, Func<TSource, IObservable<TResult>> selector, Action<TResult> onNext)

View source

Type parameters

NameDescription
TSource--
TResult--

Parameters

NameTypeDescription
sourceIObservable--
selectorFunc>--
onNextAction--

Returns: IDisposable

8. Overload

public static IDisposable SwitchSubscribe<TSource, TResult>(this IObservable<TSource?> source, Func<TSource, IObservable<TResult>> selector, Action<TResult> onNext, Action<Exception> onError, Action onCompleted) where TSource : notnull where TResult : notnull

View source

Type parameters

NameDescription
TSource--
TResult--

Parameters

NameTypeDescription
sourceIObservable--
selectorFunc>--
onNextAction--
onErrorAction--
onCompletedAction--

Returns: IDisposable