Table of Contents

Class HsmStateMeta<T, THsm, TState, TInputs>

Namespace
MarymoorStudios.Core.Fsm
Assembly
MarymoorStudios.Core.Fsm.dll

Metadata for a single state in an HSM.

public sealed class HsmStateMeta<T, THsm, TState, TInputs> where THsm : Hsm<T, THsm, TState, TInputs>, IHsm<T, THsm, TState, TInputs> where TState : HsmState<T, THsm, TState, TInputs>, IHsmState<T, THsm, TState, TInputs>

Type Parameters

T

The data class for the state machine.

THsm

The class for the state machine itself.

TState

The base-type for all states in the machine.

TInputs

The class that defines inputs to the machine.

Inheritance
HsmStateMeta<T, THsm, TState, TInputs>
Inherited Members

Methods

Edge(HsmInputMeta<T, THsm, TState, TInputs>, Action<THsm>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge(HsmInputMeta<T, THsm, TState, TInputs> input, Action<THsm> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs>

The input signal to handle.

action Action<THsm>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TReturn>, Func<THsm, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TReturn> input, Func<THsm, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TReturn>

The input signal to handle.

action Func<THsm, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1>(HsmInputMeta<T, THsm, TState, TInputs, TArg1>, Action<THsm, TArg1>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1>(HsmInputMeta<T, THsm, TState, TInputs, TArg1> input, Action<THsm, TArg1> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1>

The input signal to handle.

action Action<THsm, TArg1>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TReturn>, Func<THsm, TArg1, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TReturn> input, Func<THsm, TArg1, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2>, Action<THsm, TArg1, TArg2>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2> input, Action<THsm, TArg1, TArg2> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2>

The input signal to handle.

action Action<THsm, TArg1, TArg2>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TReturn>, Func<THsm, TArg1, TArg2, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TReturn> input, Func<THsm, TArg1, TArg2, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3>, Action<THsm, TArg1, TArg2, TArg3>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3> input, Action<THsm, TArg1, TArg2, TArg3> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3>

The input signal to handle.

action Action<THsm, TArg1, TArg2, TArg3>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TReturn>, Func<THsm, TArg1, TArg2, TArg3, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TReturn> input, Func<THsm, TArg1, TArg2, TArg3, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TArg3, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4>, Action<THsm, TArg1, TArg2, TArg3, TArg4>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4> input, Action<THsm, TArg1, TArg2, TArg3, TArg4> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4>

The input signal to handle.

action Action<THsm, TArg1, TArg2, TArg3, TArg4>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TReturn>, Func<THsm, TArg1, TArg2, TArg3, TArg4, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TReturn> input, Func<THsm, TArg1, TArg2, TArg3, TArg4, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TArg3, TArg4, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5>, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5> input, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5>

The input signal to handle.

action Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TReturn>, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TReturn> input, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6> input, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>

The input signal to handle.

action Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TArg6

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn>, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn> input, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TArg6

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7> input, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>

The input signal to handle.

action Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TArg6

Argument to the input.

TArg7

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn>, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn> input, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TArg6

Argument to the input.

TArg7

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>(HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8> input, Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>

The input signal to handle.

action Action<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TArg6

Argument to the input.

TArg7

Argument to the input.

TArg8

Argument to the input.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn>, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn>, params ReadOnlySpan<TState>)

Defines an input handler.

public HsmStateMeta<T, THsm, TState, TInputs> Edge<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn>(HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn> input, Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn> action, params ReadOnlySpan<TState> destination)

Parameters

input HsmInputFuncMeta<T, THsm, TState, TInputs, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn>

The input signal to handle.

action Func<THsm, TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7, TArg8, TReturn>

The handler to be called when an input signal occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Type Parameters

TArg1

Argument to the input.

TArg2

Argument to the input.

TArg3

Argument to the input.

TArg4

Argument to the input.

TArg5

Argument to the input.

TArg6

Argument to the input.

TArg7

Argument to the input.

TArg8

Argument to the input.

TReturn

Return type.

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

OnEnter(Action<THsm>)

Defines a method to be called when the state is entered.

public HsmStateMeta<T, THsm, TState, TInputs> OnEnter(Action<THsm> method)

Parameters

method Action<THsm>

The handler to be called when a state is entered.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

The OnEnter(Action<THsm>) handler is ONLY called when a state is entered during operation in a transition from another state. The OnEnter(Action<THsm>) handler is NOT called as part of initialization (see OnStart(Action<THsm>)).

OnError(Action<THsm, TState, ErrorScope, Exception>, params ReadOnlySpan<TState>)

Defines a method to be called when a state machine encounters an unhandled error.

public HsmStateMeta<T, THsm, TState, TInputs> OnError(Action<THsm, TState, ErrorScope, Exception> method, params ReadOnlySpan<TState> destination)

Parameters

method Action<THsm, TState, ErrorScope, Exception>

The handler to be called when an error occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .

OnExit(Action<THsm>)

Defines a method to be called when the state is exited.

public HsmStateMeta<T, THsm, TState, TInputs> OnExit(Action<THsm> method)

Parameters

method Action<THsm>

The handler to be called when a state is exited.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

The OnExit(Action<THsm>) handler is ONLY called when a state is exited during operation in a transition to another state. OnExit(Action<THsm>) is NOT called during a pending call to OnEnter(Action<THsm>) (e.g. if a parent state transitions to a substate during OnEnter(Action<THsm>)).

OnStart(Action<THsm>)

Defines a method to be called when a state is started.

public HsmStateMeta<T, THsm, TState, TInputs> OnStart(Action<THsm> method)

Parameters

method Action<THsm>

The handler to be called when a state is started.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

The OnStart(Action<THsm>) handler is ONLY called during initialization, NOT when a state is reentered during operation (see OnEnter(Action<THsm>)).

OnStart(TState)

Define a shortcut for OnStart(Action<THsm>) that just moves to the declared state.

public HsmStateMeta<T, THsm, TState, TInputs> OnStart(TState s)

Parameters

s TState

The state to move to.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

OnSuccess(Action<THsm>, params ReadOnlySpan<TState>)

Defines a method to be called when a state machine encounters an unhandled eventual successes.

public HsmStateMeta<T, THsm, TState, TInputs> OnSuccess(Action<THsm> method, params ReadOnlySpan<TState> destination)

Parameters

method Action<THsm>

The handler to be called when a success occurs.

destination ReadOnlySpan<TState>

The set of states the handler is permitted to transitions to while handling the input signal.

Returns

HsmStateMeta<T, THsm, TState, TInputs>

Remarks

To remain in the same state after handling a signal, either destination MUST be left empty OR the Self state MUST be explicitly provided in destination .