Custom Types for States and Events
You can use any type that implements
IComparable and provides
GetHashCode methods for states or events.
The type has to be
IComparable because this is the only common interface shared by base types such as
But the state machine relies on
GetHashCode (actually, the list and dictionary classes of the .Net framework do this).
Here are sample custom state and event classes:
You can use these types now in the state machine: