public StateMachine(IStorageConnection connection, IStateChangeProcess stateChangeProcess) { if (connection == null) throw new ArgumentNullException("connection"); if (stateChangeProcess == null) throw new ArgumentNullException("stateChangeProcess"); _connection = connection; _stateChangeProcess = stateChangeProcess; }
public StateMachineFactory(JobStorage storage) { if (storage == null) throw new ArgumentNullException("storage"); var handlers = new StateHandlerCollection(); handlers.AddRange(GlobalStateHandlers.Handlers); handlers.AddRange(storage.GetStateHandlers()); _stateChangeProcess = new StateChangeProcess(handlers); }
public StateMachineFactory(JobStorage storage) { if (storage == null) { throw new ArgumentNullException("storage"); } var handlers = new StateHandlerCollection(); handlers.AddRange(GlobalStateHandlers.Handlers); handlers.AddRange(storage.GetStateHandlers()); _stateChangeProcess = new StateChangeProcess(handlers); }
public StateMachine(IStorageConnection connection, IStateChangeProcess stateChangeProcess) { if (connection == null) { throw new ArgumentNullException("connection"); } if (stateChangeProcess == null) { throw new ArgumentNullException("stateChangeProcess"); } _connection = connection; _stateChangeProcess = stateChangeProcess; }