Class OperatorContext
Operator context.
Inheritance
Implements
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public class OperatorContext : Object, IOperatorContext
Constructors
OperatorContext(Uri, IScheduler, TraceSource, IExecutionEnvironment)
Initializes a new instance of the OperatorContext class.
Declaration
public OperatorContext(Uri instanceId, IScheduler scheduler, TraceSource traceSource = null, IExecutionEnvironment executionEnvironment = null)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | instanceId | The id (URI) of the instance owning the operator. |
IScheduler | scheduler | The scheduler to perform asynchronous activities on. |
System.Diagnostics.TraceSource | traceSource | Trace source to log operator diagnostic information to. |
IExecutionEnvironment | executionEnvironment | The execution environment where the operator is executing in. |
Properties
ExecutionEnvironment
Gets the execution environment where the operator is executing in.
Declaration
public IExecutionEnvironment ExecutionEnvironment { get; }
Property Value
Type | Description |
---|---|
IExecutionEnvironment |
InstanceId
Gets the id (URI) of the instance owning the operator.
Declaration
public Uri InstanceId { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Scheduler
Gets the scheduler to perform asynchronous activities on.
Declaration
public IScheduler Scheduler { get; }
Property Value
Type | Description |
---|---|
IScheduler |
TraceSource
Gets the trace source to log operator diagnostic information to.
Declaration
public 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
public virtual 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. |