Class ContextSwitchOperator<TParam, TResult>
Base class for operators that need a context switch between some arbitrary thread and a logical scheduler.
Inheritance
System.Object
Operator<TParam, TResult>
VersionedOperator<TParam, TResult>
StatefulOperator<TParam, TResult>
ContextSwitchOperator<TParam, TResult>
Implements
System.IDisposable
System.IObserver<TResult>
Inherited Members
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public abstract class ContextSwitchOperator<TParam, TResult> : StatefulOperator<TParam, TResult>, ISubscription, IStatefulOperator, IOperator, IDisposable, IVersioned, IObserver<TResult>
Type Parameters
Name | Description |
---|---|
TParam | Type of parameter. |
TResult | Type of elements produced by the context switch operator. |
Constructors
ContextSwitchOperator(TParam, IObserver<TResult>)
Initializes a new instance of the ContextSwitchOperator<TParam, TResult> class.
Declaration
protected ContextSwitchOperator(TParam parent, IObserver<TResult> observer)
Parameters
Type | Name | Description |
---|---|---|
TParam | parent | Parameters passed to the context switch operator. |
System.IObserver<TResult> | observer | Observer to publish elements into. |
Properties
MonitorableQueue
Gets the queue maintained by the context switch operator.
Declaration
public IMonitorableQueue<TResult> MonitorableQueue { get; }
Property Value
Type | Description |
---|---|
IMonitorableQueue<TResult> |
Methods
OnCompleted()
Publishes a completion notification into the context switch operator.
Declaration
public virtual void OnCompleted()
OnError(Exception)
Publishes an error into the context switch operator.
Declaration
public virtual void OnError(Exception error)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | error | Error to publish. |
OnNext(TResult)
Publishes a value into the context switch operator.
Declaration
public virtual void OnNext(TResult value)
Parameters
Type | Name | Description |
---|---|---|
TResult | value | Value to publish. |
OnSubscribe()
Subscribes to the operator's input.
Declaration
protected override IEnumerable<ISubscription> OnSubscribe()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISubscription> | Sequence of operator inputs. |
Overrides
Reaqtive.Operator<TParam, TResult>.OnSubscribe()
Implements
System.IDisposable
System.IObserver<>