Table of Contents

Interface StateMachine

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

A state machine definition

public interface StateMachine : IVisitable, IProbeSite
Inherited Members

Properties

Events

The events defined in the state machine

IEnumerable<Event> Events { get; }

Property Value

IEnumerable<Event>

Final

The final state of a state machine instance

State Final { get; }

Property Value

State

Initial

The initial state of a new state machine instance

State Initial { get; }

Property Value

State

InstanceType

The instance type associated with the state machine

Type InstanceType { get; }

Property Value

Type

Name

The name of the state machine (defaults to the state machine type name)

string Name { get; }

Property Value

string

States

The states defined in the state machine

IEnumerable<State> States { get; }

Property Value

IEnumerable<State>

Methods

GetEvent(string)

Returns the event requested

Event GetEvent(string name)

Parameters

name string

Returns

Event

GetState(string)

Returns the state requested

State GetState(string name)

Parameters

name string

Returns

State

IsCompositeEvent(Event)

Returns true if the event is or is used by a composite event

bool IsCompositeEvent(Event @event)

Parameters

event Event

Returns

bool

NextEvents(State)

The valid events that can be raised during the specified state

IEnumerable<Event> NextEvents(State state)

Parameters

state State

The state to query

Returns

IEnumerable<Event>

An enumeration of valid events