Class ScyllaPausableStateBase<TContext>
Convenience base class for pausable states used with
ScyllaPushdownStateMachine<TContext>. All callbacks are virtual
no-ops (with CanEnter(TContext) returning
true), so implementations override only what they need.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public abstract class ScyllaPausableStateBase<TContext> : ScyllaStateBase<TContext>, IScyllaPausableState<TContext>, IScyllaState<TContext>
Type Parameters
| Name | Description |
|---|---|
| TContext | The shared context type passed to every state callback. |
Methods
OnPause(TContext)
Called when another state is pushed over this state. The state remains on the machine's stack and keeps its data; it stops receiving ticks until resumed.
Declaration
public virtual void OnPause(TContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| TContext | context | The machine's shared context. |
OnResume(TContext)
Called when this state becomes current again after the state above it was popped. OnEnter(TContext) is NOT called; the state resumes exactly where it was paused.
Declaration
public virtual void OnResume(TContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| TContext | context | The machine's shared context. |
Implements
Extension Methods
See Also
IScyllaPausableState<TContext>
ScyllaStateBase<TContext>