Observer.Checked(IObserver) method¶
Defined in
Type: Observer
Namespace: System.Reactive
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IObserver<T> Checked<T>(this IObserver<T> observer)
Summary: Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods. If a violation is detected, an InvalidOperationException is thrown from the offending observer method call.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements received by the source observer. |
Parameters
| Name | Type | Description |
|---|---|---|
observer | IObserver | The observer whose callback invocations should be checked for grammar violations. |
Returns: IObserver
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | observer is null. |