public ResponseBase Input(ParsedUtterance utterance) { if (!_isInitialized) { throw new InvalidOperationException("Cannot take input before initialization"); } var inputAct = _factory.GetBestDialogAct(utterance); _currentState = applyInput(inputAct, _currentState); //reset expect answer flag after each input. _currentState = _currentState.SetExpectAnswer(false); return(applyAction()); }
protected void SetExpectAnswer(bool expectAnswer) { _newState = _newState.SetExpectAnswer(expectAnswer); }