Esempio n. 1
0
 /// <summary>
 /// Adds user response to response cache
 /// </summary>
 public void AddResponse(string diaId, BotRequest request)
 {
     if (!request.IsNull())
     {
         ResponcesCache.Add(diaId, request);
     }
 }
        public BotResponse AddRequest(UserContextState state, BotRequest request)
        {
            state.AddResponse(state.CurrentDialog.Id, request);
            var serialDia = state.CurrentDialog.Owner as SerialDialog;

            if (serialDia != null)
            {
                return(new BotResponse(null, BotResponse.ResponseType.Dialog, state.User, serialDia.Next(state.CurrentDialog)));
            }

            return(new BotResponse(null, BotResponse.ResponseType.Dialog, state.User, state.CurrentDialog));
        }
 public BotResponse AddRequest(IUser user, BotRequest request)
 {
     return(AddRequest(GetUserState(user), request));
 }