SingleElementWitness class¶
Defined in
Namespace: ReactiveUI.Primitives.Async.Advanced
Assembly: ReactiveUI.Primitives.Async.Core.dll
Full name: ReactiveUI.Primitives.Async.Advanced.SingleElementWitness<T>
Modifiers: public sealed
Summary¶
Shared observer used by both SingleAsync and SingleOrDefaultAsync. The two operator
surfaces previously held near-identical observer classes; the only behavioural difference is
whether an empty sequence throws or returns a caller-supplied default. That difference is now a
single flag on this type, so the OnNext / OnErrorResume / OnCompleted bodies live in one place.
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
Class hierarchy
classDiagram
class SingleElementWitness~T~
class TaskResultWitnessAsyncBase~T, T?~
TaskResultWitnessAsyncBase~T, T?~ <|-- SingleElementWitness~T~
Inherits from: TaskResultWitnessAsyncBase
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Shared observer used by both SingleAsync and SingleOrDefaultAsync. The two operator surfaces previously held near-identical observer classes; the only behavioural difference is whether an... |
Methods¶
| Name | Summary |
|---|---|
| OnNextAsyncCore | Processes the next value in the asynchronous sequence. |
| OnErrorResumeAsyncCore | Handles an error by providing an asynchronous mechanism to resume execution after an exception occurs. |
| OnCompletedAsyncCore | Performs asynchronous completion logic when the operation has finished processing the specified result. |