Table of Contents

Class BaseStepFunction

Namespace
Microsoft.Accordant
Assembly
Accordant.dll

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

string

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

state IState
path IReadOnlyList<(IStepFunction, StateGraphNode)>

Returns

IList<StepResult>

ApplyInternal(IState)

protected virtual IList<StepResult> ApplyInternal(IState state)

Parameters

state IState

Returns

IList<StepResult>

ApplyInternal(IState, IReadOnlyList<(IStepFunction, StateGraphNode)>)

protected virtual IList<StepResult> ApplyInternal(IState state, IReadOnlyList<(IStepFunction, StateGraphNode)> path)

Parameters

state IState
path IReadOnlyList<(IStepFunction, StateGraphNode)>

Returns

IList<StepResult>