Beispiel #1
0
        protected AliceResponseBase(AliceRequestBase <TSession, TUser> request, string text, string tts, List <AliceButtonModel> buttons, bool keepSessionState = true, bool keepUserState = true)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            Version  = request.Version;
            Response = new TResponse()
            {
                Text    = text,
                Tts     = tts,
                Buttons = buttons
            };

            if (request.State != null)
            {
                if (keepSessionState)
                {
                    SessionState = request.State.Session;
                }
                if (keepUserState)
                {
                    UserStateUpdate  = request.State.User;
                    ApplicationState = request.State.Application;
                }
            }
        }
 public AliceImageResponse(AliceRequestBase <object, object> request, string text, bool keepSessionState = true, bool keepUserState = true)
     : this(request, text, text, keepSessionState, keepUserState)
 {
 }
 public AliceImageResponse(AliceRequestBase <object, object> request, string text, string tts, List <AliceButtonModel> buttons, bool keepSessionState = true, bool keepUserState = true)
     : base(request, text, tts, buttons, keepSessionState, keepUserState)
 {
 }
Beispiel #4
0
 public AliceResponse(AliceRequestBase <object, object> request, string text, string tts, bool keepSessionState = true, bool keepUserState = true)
     : this(request, text, tts, new List <AliceButtonModel>(), keepSessionState, keepUserState)
 {
 }
Beispiel #5
0
 public AliceGalleryResponse(AliceRequestBase <object, object> request, string text, List <AliceButtonModel> buttons, bool keepSessionState = true, bool keepUserState = true)
     : this(request, text, text, buttons, keepSessionState, keepUserState)
 {
 }