Ejemplo n.º 1
0
        public CurrentStateHolder Get(long key)
        {
            if (!_instance._statesStorage.ContainsKey(key))
            {
                var initialState = new OnStartSelectState();
                _instance._statesStorage[key] = new CurrentStateHolder(initialState);
            }

            return(_instance._statesStorage[key]);
        }
Ejemplo n.º 2
0
        public void ProcessInput(
            long chatId,
            string input,
            TelegramBotClientFacade telegramBotClientFacade,
            CurrentStateHolder stateHolder)
        {
            var nextState = new OnStartSelectState();

            nextState.ProcessInput(chatId, input, telegramBotClientFacade, stateHolder);

            stateHolder.SetNextState(nextState);
        }
Ejemplo n.º 3
0
        public void ProcessInput(
            long chatId,
            string input,
            TelegramBotClientFacade telegramBotClientFacade,
            CurrentStateHolder stateHolder)
        {
            telegramBotClientFacade.SendMapMessageToChat(chatId);

            var initialState = new OnStartSelectState();

            initialState.PrerenderDefaultOutput(chatId, telegramBotClientFacade);
            stateHolder.SetNextState(initialState);
        }
Ejemplo n.º 4
0
        public void ProcessInput(long chatId,
                                 string input,
                                 TelegramBotClientFacade telegramBotClientFacade,
                                 CurrentStateHolder stateHolder)
        {
            var doctorName = input;
            var schedule   = GetSchedule(doctorName);

            telegramBotClientFacade.SendTextMessageToChat(chatId, schedule);

            var nextState = new OnStartSelectState();

            nextState.PrerenderDefaultOutput(chatId, telegramBotClientFacade);
            stateHolder.SetNextState(nextState);
        }