public HttpPipelineAction Move(string direction)
        {
            if (!_current.Routes.ContainsKey(direction))
            {
                throw new ArgumentOutOfRangeException(nameof(direction), direction, $"Invalid route for state {_current.State}. {direction} is out of list value");
            }

            var newState = _map.Move(_current.State, direction);

            var action = _creator.Create(newState.State);

            _current = newState;

            return(action);
        }
        public TransitionTable(TransitionList overrides, IPipelineActionCreator creator)
        {
            if (overrides == null)
            {
                throw new ArgumentNullException(nameof(overrides), $"Parameter TransitionList is null");
            }

            _creator = creator;

            _map = overrides;

            if (!_map.ContainsState(HttpState.BeforeStart))
            {
                _map.Register(HttpState.BeforeStart, new[] { new TransitionRoute(HttpPipelineAction.NEXT, HttpState.Initialcheck) });
            }

            _current = _map.FirstNode;
        }