Class BaseStepFunction
BaseStepFunction is an intermediate class other steps can inherit from. It chooses a GUID as a StepFunctionId, effectively meaning that two step functions are only equal if they are the same object. It also locks the input and output states to ensure implementations of the step don't inadvertently modify the input state and subsequent code doesn't modify the output states.
public abstract class BaseStepFunction : IStepFunction
- Inheritance
-
BaseStepFunction
- Implements
- Derived
- Inherited Members
Properties
StepFunctionId
The unique identifier of the step function.
public virtual string StepFunctionId { get; }
Property Value
Methods
Apply(IState, IReadOnlyList<(IStepFunction, StateGraphNode)>)
This method locks the state, calls the derived class's ApplyInternal(IState) method and freezes any updated states returned by that method.
public IList<StepResult> Apply(IState state, IReadOnlyList<(IStepFunction, StateGraphNode)> path)
Parameters
stateIStatepathIReadOnlyList<(IStepFunction, StateGraphNode)>
Returns
ApplyInternal(IState)
protected virtual IList<StepResult> ApplyInternal(IState state)
Parameters
stateIState
Returns
ApplyInternal(IState, IReadOnlyList<(IStepFunction, StateGraphNode)>)
protected virtual IList<StepResult> ApplyInternal(IState state, IReadOnlyList<(IStepFunction, StateGraphNode)> path)
Parameters
stateIStatepathIReadOnlyList<(IStepFunction, StateGraphNode)>