)} )} ,System.Action{System.Exception},System.Action)} ,System.Func{System.Exception,--0},System.Func{--0})}
Spark.Accept(IObserver) method¶
Defined in
Type: SparkReactiveUI.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)
Summary: Invokes the observer's method corresponding to the Spark.
Parameters
| Name | Type | Description |
|---|---|---|
observer | IObserver | Observer to invoke the Spark on. |
2. Overload¶
public TResult Accept<TResult>(IObserver<T, TResult> observer)
Summary: Invokes the observer's method corresponding to the Spark and returns the produced result.
Type parameters
| Name | Description |
|---|---|
TResult | The type of the result returned from the observer's Spark handlers. |
Parameters
| Name | Type | Description |
|---|---|---|
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)
Summary: Invokes the delegate corresponding to the Spark.
Parameters
| Name | Type | Description |
|---|---|---|
onNext | Action | Delegate to invoke for an OnNext Spark. |
onError | Action | Delegate to invoke for an OnError Spark. |
onCompleted | Action | Delegate to invoke for an OnCompleted Spark. |
4. Overload¶
public TResult Accept<TResult>(Func<T, TResult> onNext, Func<Exception, TResult> onError, Func<TResult> onCompleted)
Summary: Invokes the delegate corresponding to the Spark and returns the produced result.
Type parameters
| Name | Description |
|---|---|
TResult | The type of the result returned from the Spark handler delegates. |
Parameters
| Name | Type | Description |
|---|---|---|
onNext | Func | Delegate to invoke for an OnNext Spark. |
onError | Func | Delegate to invoke for an OnError Spark. |
onCompleted | Func | Delegate to invoke for an OnCompleted Spark. |
Returns: TResult -- Result produced by the observation.