public ConnectionServiceBase(IStateFactory stateFactory, ILogger logger) { _stateFactory = stateFactory; _logger = logger; _currentState = stateFactory.Create(ConnectionState.Disconnected); _continue = true; }
public void MoveToState(ConnectionState desiredState) { _currentState = _stateFactory.Create(desiredState); }