Class AsyncReactiveQubjectBase<TInput, TOutput>
Base class for the implementation of subjects represented by an expression tree.
Inheritance
Implements
Inherited Members
Namespace: Reaqtor
Assembly: Reaqtor.Expressions.Core.dll
Syntax
public abstract class AsyncReactiveQubjectBase<TInput, TOutput> : AsyncReactiveSubjectBase<TInput, TOutput>, IAsyncReactiveQubject<TInput, TOutput>, IAsyncReactiveSubject<TInput, TOutput>, IAsyncDisposable, IAsyncReactiveQbserver<TInput>, IAsyncReactiveObserver<TInput>, IAsyncReactiveQbservable<TOutput>, IAsyncReactiveObservable<TOutput>, IAsyncReactiveQubject, IAsyncReactiveQbserver, IAsyncReactiveQbservable, IAsyncReactiveExpressible, IExpressible
Type Parameters
Name | Description |
---|---|
TInput | Type of the data received by the subject. |
TOutput | Type of the data produced by the subject. |
Constructors
AsyncReactiveQubjectBase(IAsyncReactiveQueryProvider)
Creates a new subject represented by an expression tree, using the specified associated query provider.
Declaration
protected AsyncReactiveQubjectBase(IAsyncReactiveQueryProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IAsyncReactiveQueryProvider | provider | Query provider associated with the subject. |
Properties
Expression
Gets the expression tree representing the subject.
Declaration
public abstract Expression Expression { get; }
Property Value
Type | Description |
---|---|
System.Linq.Expressions.Expression |
InputType
Gets the type of the data received by the subject.
Declaration
protected Type InputType { get; }
Property Value
Type | Description |
---|---|
System.Type |
OutputType
Gets the type of the data produced by the subject.
Declaration
protected Type OutputType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Provider
Gets the query provider that is associated with the subject.
Declaration
public IAsyncReactiveQueryProvider Provider { get; }
Property Value
Type | Description |
---|---|
IAsyncReactiveQueryProvider |
Methods
SubscribeAsync(IAsyncReactiveQbserver<TOutput>, Uri, Object, CancellationToken)
Subscribes to the subject using the given observer.
Declaration
public Task<IAsyncReactiveQubscription> SubscribeAsync(IAsyncReactiveQbserver<TOutput> observer, Uri subscriptionUri, object state = null, CancellationToken token = null)
Parameters
Type | Name | Description |
---|---|---|
IAsyncReactiveQbserver<TOutput> | observer | Observer to send the subject's data to. |
System.Uri | subscriptionUri | URI to identify the subscription. |
System.Object | state | Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it. |
System.Threading.CancellationToken | token | Token to observe for cancellation of the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncReactiveQubscription> | Task returning a subscription object that can be used to cancel the subscription, or an exception if the submission was unsuccessful. |
SubscribeAsyncCore(IAsyncReactiveObserver<TOutput>, Uri, Object, CancellationToken)
Subscribes to the subject using the given observer.
Declaration
protected override Task<IAsyncReactiveSubscription> SubscribeAsyncCore(IAsyncReactiveObserver<TOutput> observer, Uri subscriptionUri, object state, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
IAsyncReactiveObserver<TOutput> | observer | Observer to send the subject's data to. |
System.Uri | subscriptionUri | URI to identify the subscription. |
System.Object | state | Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it. |
System.Threading.CancellationToken | token | Token to observe for cancellation of the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncReactiveSubscription> | Task returning a subscription object that can be used to cancel the subscription, or an exception if the submission was unsuccessful. |
Overrides
SubscribeAsyncCore(IAsyncReactiveQbserver<TOutput>, Uri, Object, CancellationToken)
Subscribes to the subject using the given observer.
Declaration
protected abstract Task<IAsyncReactiveQubscription> SubscribeAsyncCore(IAsyncReactiveQbserver<TOutput> observer, Uri subscriptionUri, object state, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
IAsyncReactiveQbserver<TOutput> | observer | Observer to send the subject's data to. |
System.Uri | subscriptionUri | URI to identify the subscription. |
System.Object | state | Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it. |
System.Threading.CancellationToken | token | Token to observe for cancellation of the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncReactiveQubscription> | Task returning a subscription object that can be used to cancel the subscription, or an exception if the submission was unsuccessful. |
Explicit Interface Implementations
IAsyncReactiveQbservable.ElementType
Gets the type of the data produced by the subject.
Declaration
Type IAsyncReactiveQbservable.ElementType { get; }
Returns
Type | Description |
---|---|
System.Type |
IAsyncReactiveQbserver.ElementType
Gets the type of the data received by the subject.
Declaration
Type IAsyncReactiveQbserver.ElementType { get; }
Returns
Type | Description |
---|---|
System.Type |