Class ObserveOnlyExecutor<TState, TAction, TEvent>
Decorator executor that wraps any other IExecutor<TState, TAction, TEvent>
and records what would have happened without sending orders to the
exchange. Used in SHADOW_* scenarios.
public sealed class ObserveOnlyExecutor<TState, TAction, TEvent> : IExecutor<TState, TAction, TEvent> where TState : IExecutionState where TAction : ITradeAction where TEvent : ITradeEvent<TAction, DateTimeOffset>
Type Parameters
TStateTActionTEvent
- Inheritance
-
ObserveOnlyExecutor<TState, TAction, TEvent>
- Implements
-
IExecutor<TState, TAction, TEvent>
- Inherited Members
Constructors
ObserveOnlyExecutor(IExecutor<TState, TAction, TEvent>)
Construct an observer wrapping inner.
public ObserveOnlyExecutor(IExecutor<TState, TAction, TEvent> inner)
Parameters
innerIExecutor<TState, TAction, TEvent>
Properties
Initial
The initial state of the executor.
public TState Initial { get; }
Property Value
- TState
Observed
Read-only view of all observed events so far.
public IReadOnlyList<TEvent> Observed { get; }
Property Value
- IReadOnlyList<TEvent>
Methods
ExecuteAsync(TState, TAction)
Execute one TAction, producing the next state and an outcome event.
public Task<(TState NextState, TEvent Event)> ExecuteAsync(TState state, TAction action)
Parameters
stateTStateCurrent executor state.
actionTActionThe action to execute.