Skip to content

,System.Func{--0,System.Threading.Tasks.ValueTask},System.Action{System.Exception},System.Action)} ,System.Func{--0,System.Threading.Tasks.ValueTask},System.Action{System.Exception})} ,System.Func{--0,System.Threading.Tasks.ValueTask},System.Action)} ,System.Func{--0,System.Threading.Tasks.ValueTask})}

ReactiveExtensions.SubscribeSynchronous(IObservable, Func, Action, Action) method

Defined in

Type: ReactiveExtensions Namespace: ReactiveUI.Extensions Assembly: ReactiveUI.Extensions.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Overloads

  • 1. public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext, Action<Exception> onError, Action onCompleted)
  • 2. public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext, Action<Exception> onError)
  • 3. public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext, Action onCompleted)
  • 4. public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext)

1. Overload

public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext, Action<Exception> onError, Action onCompleted)

View source

Summary: Subscribes to the specified source synchronously.

Type parameters

NameDescription
TThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableThe source.
onNextFuncThe on next.
onErrorActionThe on error.
onCompletedActionThe on completed.

Returns: IDisposable -- IDisposable object used to unsubscribe from the observable sequence.

2. Overload

public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext, Action<Exception> onError)

View source

Summary: Subscribes an element handler and an exception handler to an observable sequence synchronously.

Type parameters

NameDescription
TThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableObservable sequence to subscribe to.
onNextFuncAction to invoke for each element in the observable sequence.
onErrorActionAction to invoke upon exceptional termination of the observable sequence.

Returns: IDisposable -- IDisposable object used to unsubscribe from the observable sequence.

3. Overload

public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext, Action onCompleted)

View source

Summary: Subscribes an element handler and a completion handler to an observable sequence synchronously.

Type parameters

NameDescription
TThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableObservable sequence to subscribe to.
onNextFuncAction to invoke for each element in the observable sequence.
onCompletedActionAction to invoke upon graceful termination of the observable sequence.

Returns: IDisposable -- IDisposable object used to unsubscribe from the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or onNext or onCompleted is null.

4. Overload

public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, ValueTask> onNext)

View source

Summary: Subscribes an element handler to an observable sequence synchronously.

Type parameters

NameDescription
TThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableObservable sequence to subscribe to.
onNextFuncAction to invoke for each element in the observable sequence.

Returns: IDisposable -- IDisposable object used to unsubscribe from the observable sequence.