Class InputStepFunction
A test operation step function represents the effect of applying the model of an operation. It is enabled based on the shouldApply predicate. It returns all possible updated states returned by Invoke(object, IState) as the set of updated states the system can transition to.
public class InputStepFunction : BaseStepFunction, IStepFunction
- Inheritance
-
InputStepFunction
- Implements
- Inherited Members
Constructors
InputStepFunction(OperationInput, bool, Func<OperationInput, IState, bool>, Func<OperationInput, IList<OperationInput>, bool>, Func<UnwindContext, bool>, ISpec, Dictionary<string, int>, Dictionary<string, object>, Dictionary<string, object>, Dictionary<string, Func<object>>, IList<DerivationSelector>)
Constructs an instance of this class given a request and a model definition.
public InputStepFunction(OperationInput operationInput, bool addNonInputStepFunctions, Func<OperationInput, IState, bool> shouldApply, Func<OperationInput, IList<OperationInput>, bool> shouldPreserveOperation, Func<UnwindContext, bool> shouldUnwindStepFunction, ISpec spec, Dictionary<string, int> operationCount, Dictionary<string, object> operationCallRequests, Dictionary<string, object> operationCallResponses, Dictionary<string, Func<object>> requestTemplates, IList<DerivationSelector> derivationSelectors)
Parameters
operationInputOperationInputaddNonInputStepFunctionsboolshouldApplyFunc<OperationInput, IState, bool>shouldPreserveOperationFunc<OperationInput, IList<OperationInput>, bool>shouldUnwindStepFunctionFunc<UnwindContext, bool>specISpecoperationCountDictionary<string, int>operationCallRequestsDictionary<string, object>operationCallResponsesDictionary<string, object>requestTemplatesDictionary<string, Func<object>>derivationSelectorsIList<DerivationSelector>
Properties
OperationInput
public OperationInput OperationInput { get; }
Property Value
StepFunctionId
The unique identifier of the step function.
public override string StepFunctionId { get; }
Property Value
Methods
ApplyInternal(IState, IReadOnlyList<(IStepFunction, StateGraphNode)>)
Returns whether the step is enabled based on the shouldApply predicate and a set of updated states (and optional step functions) the system should transition to.
protected override IList<StepResult> ApplyInternal(IState state, IReadOnlyList<(IStepFunction, StateGraphNode)> path)
Parameters
stateIStateThe current state.
pathIReadOnlyList<(IStepFunction, StateGraphNode)>The path of step functions taken to reach this state.
Returns
- IList<StepResult>
List of step results, or null if not enabled.
ToString()
public override string ToString()