Interface IOperatorContext
This is the context provided to each reactive operator after it is instantiated. Operators must interact with the environment only through this context to ensure that they can be properly hosted inside QueryEngines.
Namespace: Reaqtive
Assembly: Reaqtive.Interfaces.dll
Syntax
public interface IOperatorContext
Properties
ExecutionEnvironment
The execution environment in which the operator is being executed. The operator can access other runtime artifacts in the execution environment through this interface. E.g. late binding to subjects by id.
Declaration
IExecutionEnvironment ExecutionEnvironment { get; }
Property Value
Type | Description |
---|---|
IExecutionEnvironment |
InstanceId
The instance owning the operators. This is the URI of the subscription or the stream.
Declaration
Uri InstanceId { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Scheduler
The scheduler that must be used for any asynchronous processing by the operator.
Declaration
IScheduler Scheduler { get; }
Property Value
Type | Description |
---|---|
IScheduler |
TraceSource
A trace source that can be used by the operator.
Declaration
TraceSource TraceSource { get; }
Property Value
Type | Description |
---|---|
System.Diagnostics.TraceSource |
Methods
TryGetElement<T>(String, out T)
Tries to get an element from the context with the given identifier.
Declaration
bool TryGetElement<T>(string id, out T value)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier handle for the context element. |
T | value | Result of obtaining the context element with the specified identifier. If not element is found, this value is left empty. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of the element stored in the context. |