コード例 #1
0
        public ActionResult Restart(ConverseViewModel model)
        {
            var match = new Match();

            if (model != null)
            {
                if (model.Match != null)
                {
                    if (!string.IsNullOrWhiteSpace(model.Match.TextIn))
                    {
                        match.TextIn = model.Match.TextIn;
                    }
                }
            }

            _converseService.RestartConversation(match);

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public ActionResult Index(ConverseViewModel model)
        {
            var match = new Match();

            if (model != null)
            {
                if (model.Match != null)
                {
                    if (!string.IsNullOrWhiteSpace(model.Match.TextIn))
                    {
                        match.TextIn = model.Match.TextIn;
                    }
                }
            }

            var getmatch = _converseService.UpdateConversation(match);
            var newmodel = new ConverseViewModel {
                Conversation = getmatch, Match = new Match()
            };

            return(View(newmodel));
        }
コード例 #3
0
        public ActionResult Tracker(ConverseViewModel model)
        {
            var match = new Match {
                TextIn = "Context"
            };

            if (model != null)
            {
                if (model.Match != null)
                {
                    if (!string.IsNullOrWhiteSpace(model.Match.TextIn))
                    {
                        match.TextIn = model.Match.TextIn;
                    }
                }
            }

            var getmatch = _converseService.GetContext(match);
            var newmodel = new ConverseViewModel {
                Conversation = getmatch, Match = new Match()
            };

            return(View(newmodel));
        }