public void ConfigureTransition(StateResult result, Func <IObservable <ITransition> > stateFactory) { Ensure.Argument.IsNotNull(result, nameof(result)); Ensure.Argument.IsNotNull(stateFactory, nameof(stateFactory)); transitionHandlers.Add(result, _ => stateFactory()); }
private void startSync(SyncState newState, StateResult entryPoint) { ensureNotSyncing(); syncing = true; stateEntered.OnNext(newState); stateMachine.Start(entryPoint.Transition()); }
public void ConfigureTransition <T>(StateResult <T> result, Func <T, IObservable <ITransition> > stateFactory) { Ensure.Argument.IsNotNull(result, nameof(result)); Ensure.Argument.IsNotNull(stateFactory, nameof(stateFactory)); transitionHandlers.Add( result, t => stateFactory(((Transition <T>)t).Parameter) ); }
public void ConfigureTransition <T>(StateResult <T> result, ISyncState <T> state) { Ensure.Argument.IsNotNull(result, nameof(result)); Ensure.Argument.IsNotNull(state, nameof(state)); transitionHandlers.Add( result, t => state.Start(((Transition <T>)t).Parameter) ); }