Hi,
First of all, great library you got here! We are looking into using it for a major project instead of WWF. The only question I still have, is how the library will react when two (different) triggers are fired at (rougly) the same time, and the guard clause condition functions take some time to evaluate. Will the guard clause which permits a transition and finishes first trigger a transition, despite called later than the first guard clause?
For example:
var facetimeCall = new StateMachine<State, Trigger>(State.OffHook);
facetimeCall.Configure(State.Ringing)
.PermitIf(Trigger.HungUp, State.Ringing, () => IsDisconnectButtonEnabled())
.PermitIf(Trigger.CallConnected, State.Beeping, () => IsWifiEnabled());
So what wil happen when Trigger.HungUp is fired first, the IsDisconnectButtonEnabled() takes very a long time, meanwhile Trigger.CallConnected is fired
and IsWifiEnabled() returns a value before IsDisconnectButtonEnabled() can return a value?
Thanks in advance!
Simon