AsyncSubject class¶
Defined in
Namespace: System.Reactive.Subjects
Assembly: System.Reactive.dll
Full name: System.Reactive.Subjects.AsyncSubject<T>
Modifiers: public sealed
Summary¶
Represents the result of an asynchronous operation.
The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.
Applies to
netstandard2.0
Class hierarchy
classDiagram
class AsyncSubject~T~
class SubjectBase~T~
SubjectBase~T~ <|-- AsyncSubject~T~
class INotifyCompletion {
<>
}
INotifyCompletion <|.. AsyncSubject~T~
Inherits from: SubjectBase
Implements: INotifyCompletion
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Creates a subject that can only receive one value and that value is cached for all future observations. |
Properties¶
| Name | Summary |
|---|---|
| HasObservers | Indicates whether the subject has observers subscribed to it. |
| IsDisposed | Indicates whether the subject has been disposed. |
| IsCompleted | Gets whether the AsyncSubject has completed. |
Methods¶
| Name | Summary |
|---|---|
| OnCompleted | Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any). |
| OnError | Notifies all subscribed observers about the exception. |
| OnNext | Sends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers. |
| Subscribe | Subscribes an observer to the subject. |
| Dispose | Unsubscribe all observers and release resources. |
| GetAwaiter | Gets an awaitable object for the current AsyncSubject. |
| GetResult | Gets the last element of the subject, potentially blocking until the subject completes successfully or exceptionally. |