Class ReifiedOperationVisitor<TResult>
Visitor for reified operations.
Inheritance
Namespace: Reaqtor.ReificationFramework
Assembly: Reaqtor.ReificationFramework.dll
Syntax
public abstract class ReifiedOperationVisitor<TResult> : Object
Type Parameters
Name | Description |
---|---|
TResult | The visitor result type. |
Constructors
ReifiedOperationVisitor()
Declaration
protected ReifiedOperationVisitor()
Methods
MakeAsync(TResult, Action<Task>, CancellationToken)
Makes an async operation.
Declaration
protected abstract TResult MakeAsync(TResult operation, Action<Task> onStart, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
TResult | operation | The operation. |
System.Action<System.Threading.Tasks.Task> | onStart | A callback to return the task after the operation has been started. |
System.Threading.CancellationToken | token | A cancellation token to give to the task factory. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
MakeCatch<T>(TResult, Action<T>)
Makes a catch operation.
Declaration
protected abstract TResult MakeCatch<T>(TResult operation, Action<T> handler)
where T : Exception
Parameters
Type | Name | Description |
---|---|---|
TResult | operation | The operation. |
System.Action<T> | handler | The exception handler. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
Type Parameters
Name | Description |
---|---|
T | The exception type. |
MakeChain(TResult, IEnumerable<TResult>)
Makes a chain operation.
Declaration
protected abstract TResult MakeChain(TResult first, IEnumerable<TResult> rest)
Parameters
Type | Name | Description |
---|---|---|
TResult | first | The first operation. |
System.Collections.Generic.IEnumerable<TResult> | rest | The remaining operations. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
MakeInstrument(TResult, Action, Action)
Makes an instrument operation.
Declaration
protected abstract TResult MakeInstrument(TResult operation, Action onEnter, Action onExit)
Parameters
Type | Name | Description |
---|---|---|
TResult | operation | The operation. |
System.Action | onEnter | Callback to invoke prior to evaluating the operation. |
System.Action | onExit | Callback to invoke after evaluating the operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
MakeLiftWildcards(TResult, IWildcardGenerator)
Makes a lift wildcards operation.
Declaration
protected abstract TResult MakeLiftWildcards(TResult operation, IWildcardGenerator generator)
Parameters
Type | Name | Description |
---|---|---|
TResult | operation | The operation. |
IWildcardGenerator | generator | The wildcard generator. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
MakeRepeat(TResult, Int64)
Makes a repeat operation.
Declaration
protected abstract TResult MakeRepeat(TResult operation, long count)
Parameters
Type | Name | Description |
---|---|---|
TResult | operation | The operation. |
System.Int64 | count | The number of times to repeat the operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
MakeRepeatUntil(TResult, CancellationToken)
Makes a repeat until operation.
Declaration
protected abstract TResult MakeRepeatUntil(TResult operation, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
TResult | operation | The operation. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
Visit(ReifiedOperation)
Visits a reified operation.
Declaration
public virtual TResult Visit(ReifiedOperation operation)
Parameters
Type | Name | Description |
---|---|---|
ReifiedOperation | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitAsync(Async)
Visits an async operation.
Declaration
protected virtual TResult VisitAsync(Async operation)
Parameters
Type | Name | Description |
---|---|---|
Async | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitCatch<T>(Catch<T>)
Visits a catch operation.
Declaration
protected virtual TResult VisitCatch<T>(Catch<T> operation)
where T : Exception
Parameters
Type | Name | Description |
---|---|---|
Catch<T> | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
Type Parameters
Name | Description |
---|---|
T | The exception type. |
VisitChain(Chain)
Visits a chain operation.
Declaration
protected virtual TResult VisitChain(Chain operation)
Parameters
Type | Name | Description |
---|---|---|
Chain | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitExtension(ReifiedOperation)
Visits an operation of an extension type.
Declaration
protected abstract TResult VisitExtension(ReifiedOperation operation)
Parameters
Type | Name | Description |
---|---|---|
ReifiedOperation | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitInstrument(Instrument)
Visits an instrument operation.
Declaration
protected virtual TResult VisitInstrument(Instrument operation)
Parameters
Type | Name | Description |
---|---|---|
Instrument | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitLiftWildcards(LiftWildcards)
Visits a lift wildcards operation.
Declaration
protected virtual TResult VisitLiftWildcards(LiftWildcards operation)
Parameters
Type | Name | Description |
---|---|---|
LiftWildcards | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitQueryEngineOperation(QueryEngineOperation)
Visits a query engine operation.
Declaration
protected abstract TResult VisitQueryEngineOperation(QueryEngineOperation operation)
Parameters
Type | Name | Description |
---|---|---|
QueryEngineOperation | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitRepeat(Repeat)
Visits a repeat operation.
Declaration
protected virtual TResult VisitRepeat(Repeat operation)
Parameters
Type | Name | Description |
---|---|---|
Repeat | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitRepeatUntil(RepeatUntil)
Visits a repeat until operation.
Declaration
protected virtual TResult VisitRepeatUntil(RepeatUntil operation)
Parameters
Type | Name | Description |
---|---|---|
RepeatUntil | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |
VisitServiceOperation(ServiceOperation)
Visits a service operation.
Declaration
protected abstract TResult VisitServiceOperation(ServiceOperation operation)
Parameters
Type | Name | Description |
---|---|---|
ServiceOperation | operation | The operation. |
Returns
Type | Description |
---|---|
TResult | The result of visiting the operation. |