Skip to content

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

Spark.Accept(IObserver) method

Defined in

Type: Spark Namespace: ReactiveUI.Primitives.Reactive.Core Assembly: ReactiveUI.Primitives.Reactive.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 void Accept(IObserver<T> observer)
  • 2. public TResult Accept<TResult>(IObserver<T, TResult> observer)
  • 3. public void Accept(Action<T> onNext, Action<Exception> onError, Action onCompleted)
  • 4. public TResult Accept<TResult>(Func<T, TResult> onNext, Func<Exception, TResult> onError, Func<TResult> onCompleted)

1. Overload

public void Accept(IObserver<T> observer)

View source

Summary: Invokes the observer's method corresponding to the Spark.

Parameters

NameTypeDescription
observerIObserverObserver to invoke the Spark on.

2. Overload

public TResult Accept<TResult>(IObserver<T, TResult> observer)

View source

Summary: Invokes the observer's method corresponding to the Spark and returns the produced result.

Type parameters

NameDescription
TResultThe type of the result returned from the observer's Spark handlers.

Parameters

NameTypeDescription
observer[IObserver](#Observer to invoke the Spark on.

Returns: TResult -- Result produced by the observation.

3. Overload

public void Accept(Action<T> onNext, Action<Exception> onError, Action onCompleted)

View source

Summary: Invokes the delegate corresponding to the Spark.

Parameters

NameTypeDescription
onNextActionDelegate to invoke for an OnNext Spark.
onErrorActionDelegate to invoke for an OnError Spark.
onCompletedActionDelegate to invoke for an OnCompleted Spark.

4. Overload

public TResult Accept<TResult>(Func<T, TResult> onNext, Func<Exception, TResult> onError, Func<TResult> onCompleted)

View source

Summary: Invokes the delegate corresponding to the Spark and returns the produced result.

Type parameters

NameDescription
TResultThe type of the result returned from the Spark handler delegates.

Parameters

NameTypeDescription
onNextFuncDelegate to invoke for an OnNext Spark.
onErrorFuncDelegate to invoke for an OnError Spark.
onCompletedFuncDelegate to invoke for an OnCompleted Spark.

Returns: TResult -- Result produced by the observation.