Ejemplo n.º 1
0
        public StateMachine(IStorageConnection connection, IStateChangeProcess stateChangeProcess)
        {
            if (connection == null) throw new ArgumentNullException("connection");
            if (stateChangeProcess == null) throw new ArgumentNullException("stateChangeProcess");

            _connection = connection;
            _stateChangeProcess = stateChangeProcess;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        public StateMachine(IStorageConnection connection, IStateChangeProcess stateChangeProcess)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }
            if (stateChangeProcess == null)
            {
                throw new ArgumentNullException("stateChangeProcess");
            }

            _connection         = connection;
            _stateChangeProcess = stateChangeProcess;
        }