/// <summary> /// Given a request containing user input, produces a result from the bot /// </summary> /// <param name="request">the request from the user</param> /// <returns>the result to be output to the user</returns> public async Task <Result> Query(Request request) { return(await Task.Run(() => { Result result = new Result(request.user, this, request); if (this.isAcceptingUserInput) { // Normalize the input AIMLLoader loader = new AIMLLoader(this); LIAM.Normalize.SplitIntoSentences splitter = new LIAM.Normalize.SplitIntoSentences(this); string[] rawSentences = splitter.Transform(request.rawInput); foreach (string sentence in rawSentences) { result.InputSentences.Add(sentence); string path = loader.generatePath(sentence, request.user.getLastBotOutput(), request.user.Topic, true); result.NormalizedPaths.Add(path); } // grab the templates for the various sentences from the graphmaster foreach (string path in result.NormalizedPaths) { Utils.SubQuery query = new SubQuery(path); query.Template = this.Graphmaster.evaluate(path, query, request, MatchState.UserInput, new StringBuilder()); result.SubQueries.Add(query); } // process the templates into appropriate output foreach (SubQuery query in result.SubQueries) { if (query.Template.Length > 0) { try { XmlNode templateNode = AIMLTagHandler.getNode(query.Template); string outputSentence = this.processNode(templateNode, query, request, result, request.user); if (outputSentence.Length > 0) { result.OutputSentences.Add(outputSentence); } } catch { this.writeToLog("WARNING! A problem was encountered when trying to process the input: " + request.rawInput + " with the template: \"" + query.Template + "\""); } } } } else { result.OutputSentences.Add(this.NotAcceptingUserInputMessage); } // populate the Result object result.Duration = DateTime.Now - request.StartedOn; request.user.addResult(result); return result; })); }
// Token: 0x06000072 RID: 114 RVA: 0x00004BAC File Offset: 0x00003BAC protected override string ProcessChange() { if (this.templateNode.Name.ToLower() == "sr") { XmlNode node = AIMLTagHandler.getNode("<star/>"); star star = new star(this.bot, this.user, this.query, this.request, this.result, node); string str = star.Transform(); XmlNode node2 = AIMLTagHandler.getNode("<srai>" + str + "</srai>"); srai srai = new srai(this.bot, this.user, this.query, this.request, this.result, node2); return(srai.Transform()); } return(string.Empty); }
// Token: 0x06000018 RID: 24 RVA: 0x000025A0 File Offset: 0x000015A0 protected override string ProcessChange() { if (!(this.templateNode.Name.ToLower() == "sentence")) { return(string.Empty); } if (this.templateNode.InnerText.Length > 0) { StringBuilder stringBuilder = new StringBuilder(); char[] array = this.templateNode.InnerText.Trim().ToCharArray(); bool flag = true; for (int i = 0; i < array.Length; i++) { string text = Convert.ToString(array[i]); if (this.bot.Splitters.Contains(text)) { flag = true; } Regex regex = new Regex("[a-zA-Z]"); if (regex.IsMatch(text)) { if (flag) { stringBuilder.Append(text.ToUpper(this.bot.Locale)); flag = false; } else { stringBuilder.Append(text.ToLower(this.bot.Locale)); } } else { stringBuilder.Append(text); } } return(stringBuilder.ToString()); } XmlNode node = AIMLTagHandler.getNode("<star/>"); star star = new star(this.bot, this.user, this.query, this.request, this.result, node); this.templateNode.InnerText = star.Transform(); if (this.templateNode.InnerText.Length > 0) { return(this.ProcessChange()); } return(string.Empty); }
// Token: 0x06000016 RID: 22 RVA: 0x000024C8 File Offset: 0x000014C8 protected override string ProcessChange() { if (!(this.templateNode.Name.ToLower() == "person2")) { return(string.Empty); } if (this.templateNode.InnerText.Length > 0) { return(ApplySubstitutions.Substitute(this.bot, this.bot.Person2Substitutions, this.templateNode.InnerText)); } XmlNode node = AIMLTagHandler.getNode("<star/>"); star star = new star(this.bot, this.user, this.query, this.request, this.result, node); this.templateNode.InnerText = star.Transform(); if (this.templateNode.InnerText.Length > 0) { return(this.ProcessChange()); } return(string.Empty); }
/// <summary> /// Recursively evaluates the template nodes returned from the bot /// </summary> /// <param name="node">the node to evaluate</param> /// <param name="query">the query that produced this node</param> /// <param name="request">the request from the user</param> /// <param name="result">the result to be sent to the user</param> /// <param name="user">the user who originated the request</param> /// <returns>the output string</returns> private string processNode(XmlNode node, SubQuery query, Request request, Result result, User user) { // check for timeout (to avoid infinite loops) if (request.StartedOn.AddMilliseconds(request.bot.TimeOut) < DateTime.Now) { request.bot.writeToLog("WARNING! Request timeout. User: "******" raw input: \"" + request.rawInput + "\" processing template: \"" + query.Template + "\""); request.hasTimedOut = true; return(string.Empty); } // process the node string tagName = node.Name.ToLower(); if (tagName == "template") { StringBuilder templateResult = new StringBuilder(); if (node.HasChildNodes) { // recursively check foreach (XmlNode childNode in node.ChildNodes) { templateResult.Append(processNode(childNode, query, request, result, user)); } } return(templateResult.ToString()); } else { AIMLTagHandler tagHandler = null; tagHandler = getBespokeTags(user, query, request, result, node); if (object.Equals(null, tagHandler)) { switch (tagName) { case "bot": tagHandler = new AIMLTagHandlers.bot(this, user, query, request, result, node); break; case "condition": tagHandler = new AIMLTagHandlers.condition(this, user, query, request, result, node); break; case "date": tagHandler = new AIMLTagHandlers.date(this, user, query, request, result, node); break; case "formal": tagHandler = new AIMLTagHandlers.formal(this, user, query, request, result, node); break; case "gender": tagHandler = new AIMLTagHandlers.gender(this, user, query, request, result, node); break; case "get": tagHandler = new AIMLTagHandlers.get(this, user, query, request, result, node); break; case "gossip": tagHandler = new AIMLTagHandlers.gossip(this, user, query, request, result, node); break; case "id": tagHandler = new AIMLTagHandlers.id(this, user, query, request, result, node); break; case "input": tagHandler = new AIMLTagHandlers.input(this, user, query, request, result, node); break; case "javascript": tagHandler = new AIMLTagHandlers.javascript(this, user, query, request, result, node); break; case "learn": tagHandler = new AIMLTagHandlers.learn(this, user, query, request, result, node); break; case "lowercase": tagHandler = new AIMLTagHandlers.lowercase(this, user, query, request, result, node); break; case "person": tagHandler = new AIMLTagHandlers.person(this, user, query, request, result, node); break; case "person2": tagHandler = new AIMLTagHandlers.person2(this, user, query, request, result, node); break; case "random": tagHandler = new AIMLTagHandlers.random(this, user, query, request, result, node); break; case "sentence": tagHandler = new AIMLTagHandlers.sentence(this, user, query, request, result, node); break; case "set": tagHandler = new AIMLTagHandlers.set(this, user, query, request, result, node); break; case "size": tagHandler = new AIMLTagHandlers.size(this, user, query, request, result, node); break; case "sr": tagHandler = new AIMLTagHandlers.sr(this, user, query, request, result, node); break; case "srai": tagHandler = new AIMLTagHandlers.srai(this, user, query, request, result, node); break; case "star": tagHandler = new AIMLTagHandlers.star(this, user, query, request, result, node); break; case "system": tagHandler = new AIMLTagHandlers.system(this, user, query, request, result, node); break; case "that": tagHandler = new AIMLTagHandlers.that(this, user, query, request, result, node); break; case "thatstar": tagHandler = new AIMLTagHandlers.thatstar(this, user, query, request, result, node); break; case "think": tagHandler = new AIMLTagHandlers.think(this, user, query, request, result, node); break; case "topicstar": tagHandler = new AIMLTagHandlers.topicstar(this, user, query, request, result, node); break; case "uppercase": tagHandler = new AIMLTagHandlers.uppercase(this, user, query, request, result, node); break; case "version": tagHandler = new AIMLTagHandlers.version(this, user, query, request, result, node); break; default: tagHandler = null; break; } } if (object.Equals(null, tagHandler)) { return(node.InnerText); } else { if (tagHandler.isRecursive) { if (node.HasChildNodes) { // recursively check foreach (XmlNode childNode in node.ChildNodes) { if (childNode.NodeType != XmlNodeType.Text) { childNode.InnerXml = processNode(childNode, query, request, result, user); } } } return(tagHandler.Transform()); } else { string resultNodeInnerXML = tagHandler.Transform(); XmlNode resultNode = AIMLTagHandler.getNode("<node>" + resultNodeInnerXML + "</node>"); if (resultNode.HasChildNodes) { StringBuilder recursiveResult = new StringBuilder(); // recursively check foreach (XmlNode childNode in resultNode.ChildNodes) { recursiveResult.Append(processNode(childNode, query, request, result, user)); } return(recursiveResult.ToString()); } else { return(resultNode.InnerXml); } } } } }
public TagHtml RenderTagToHtml(string tagName, string outerTagContent, string innerTagContent) { StringBuilder sb = new StringBuilder(); string dataText = ""; switch (tagName) { case "button": if (outerTagContent.Contains("<postback>")) { string dataPostback = new Regex("<postback>(.*)</postback>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; dataText = new Regex("<text>(.*)</text>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; sb.AppendLine(" <div class=\"_2zgz _2zgz_postback\">"); sb.AppendLine(" <div class=\"_4bqf _6biq _6bir\" tabindex=\"0\" role=\"button\" data-postback =\"" + dataPostback + "\" style=\"border-color:" + _color + " color:" + _color + "\">" + dataText + "</div>"); sb.AppendLine(" </div>"); _tagHtml.Body = ""; _tagHtml.ButtonPostback = sb.ToString(); } else if (outerTagContent.Contains("<url>")) { dataText = new Regex("<text>(.*)</text>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; string dataUrl = new Regex("<url>(.*)</url>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; sb.AppendLine("<div class=\"_6ir5\">"); sb.AppendLine(" <div class=\"_4bqf _6ir3\">"); sb.AppendLine(" <a class=\"_6ir4 _6ir4_url\" target=\"_blank\" href=\"" + dataUrl + "\" style=\"color:" + _color + "\">" + dataText + "</a>"); sb.AppendLine(" </div>"); sb.AppendLine("</div>"); _tagHtml.Body = sb.ToString(); } else if (outerTagContent.Contains("<menu>")) { dataText = new Regex("<text>(.*)</text>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; string dataMenu = new Regex("<menu>(.*)</menu>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; //if (_isFlag) //{ // sb.AppendLine("<div class=\"_6isd _6ir5\">"); //}else //{ // sb.AppendLine("<div class=\"_6ir5\">"); //} sb.AppendLine("<div class=\"_6ir5\">"); sb.AppendLine(" <div class=\"_4bqf _6ir3\">"); sb.AppendLine(" <a class=\"_6ir4 _6ir4_menu\" data-postback =\"" + dataMenu + "\" href=\"#\" style=\"color:" + _color + "\">" + dataText + "</a>"); sb.AppendLine(" </div>"); sb.AppendLine("</div>"); //_isFlag = false; _tagHtml.Body = sb.ToString(); } else if (outerTagContent.Contains("<module>")) { dataText = new Regex("<text>(.*)</text>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; string dataModule = new Regex("<module>(.*)</module>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; //if (_isFlag) //{ // sb.AppendLine("<div class=\"_6isd _6ir5\">"); //}else //{ // sb.AppendLine("<div class=\"_6ir5\">"); //} sb.AppendLine("<div class=\"_6ir5\">"); sb.AppendLine(" <div class=\"_4bqf _6ir3\">"); sb.AppendLine(" <a class=\"_6ir4 _6ir4_menu\" data-postback =\"" + dataModule + "\" href=\"#\" style=\"color:" + _color + "\">" + dataText + "</a>"); sb.AppendLine(" </div>"); sb.AppendLine("</div>"); //_isFlag = false; _tagHtml.Body = sb.ToString(); } break; case "link": dataText = new Regex("<text>(.*)</text>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; string dataLink = new Regex("<url>(.*)</url>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; sb.AppendLine("<div class=\"_6j0y\">"); sb.AppendLine(" <a target=\"_blank\" href=\"" + dataLink + "\">"); sb.AppendLine(" " + dataText + ""); sb.AppendLine(" </a>"); sb.AppendLine("</div>"); _tagHtml.Body = sb.ToString(); break; case "image": //Common.ReadString("Domain") host domain lay tu`appconfig cua domain cha truyen` vao` string dataImage = new Regex("<image>(.*)</image>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; sb.AppendLine("<div class=\"_6j0s\" style=\"background-image:url("" + Common.ReadString("Domain") + dataImage + ""); background-position: center center; height: 150px; width: 100%;\"></div>"); _tagHtml.Body = sb.ToString(); break; case "title": string dataTitle = new Regex("<title>(.*)</title>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; sb.AppendLine("<div class=\"_6j0t _4ik4 _4ik5 _6j0t_title\" style=\"-webkit-line-clamp: 3;\">"); sb.AppendLine("" + dataTitle + ""); sb.AppendLine("</div>"); _tagHtml.Body = sb.ToString(); break; case "subtitle": string dataSubTitle = new Regex("<subtitle>(.*)</subtitle>", RegexOptions.IgnoreCase).Match(outerTagContent).Groups[1].Value; sb.Append("<div class=\"_6j0v _6j0v_subtitle\">"); sb.AppendLine(" <div class=\"_6j0u _6j0w\">"); sb.AppendLine(" " + dataSubTitle + ""); sb.AppendLine(" </div>"); sb.AppendLine(" <div class=\"_6j0u _6j0x _4ik4 _4ik5\" style=\"-webkit-line-clamp: 2;\">"); sb.AppendLine(" <div>"); sb.AppendLine(" " + dataSubTitle + ""); sb.AppendLine(" </div>"); sb.AppendLine(" </div>"); sb.AppendLine(" </div>"); _tagHtml.Body = sb.ToString(); break; default: _tagHtml.Body = String.Empty; break; } if (tagName == "card") { XmlNode resultNode = AIMLTagHandler.getNode("<node>" + innerTagContent + "</node>"); if (resultNode.HasChildNodes) { StringBuilder sbBtnPostback = new StringBuilder(); StringBuilder sbCard = new StringBuilder(); sbCard.AppendLine("<div class=\"_6j2i\">"); string htmlCard = ""; foreach (XmlNode cNode in resultNode.ChildNodes) { htmlCard = RenderTagToHtml(cNode.Name, cNode.OuterXml, "").Body; if (cNode.Name == "title") { htmlCard = "<div class=\"_6j2g\">" + htmlCard; } if (cNode.Name == "link") { htmlCard = htmlCard + "</div>"; } if (cNode.Name == "button") { if (cNode.OuterXml.Contains("<postback>")) { _tagHtml.TotalBtnPostback = _tagHtml.TotalBtnPostback + 1; } } sbCard.AppendLine(htmlCard); sbBtnPostback.AppendLine(RenderTagToHtml(cNode.Name, cNode.OuterXml, "").ButtonPostback); } sbCard.AppendLine("</div>"); _tagHtml.Body = sbCard.ToString(); _tagHtml.ButtonPostback = sbBtnPostback.ToString(); } } if (tagName == "carousel") { XmlNode resultNode = AIMLTagHandler.getNode("<node>" + innerTagContent + "</node>"); StringBuilder sbCarousel = new StringBuilder(); if (resultNode.HasChildNodes) { foreach (XmlNode cNode in resultNode.ChildNodes) { sbCarousel.AppendLine("<div class=\"_2zgz\"> <div class=\"_6j2h\">" + RenderTagToHtml(cNode.Name, cNode.OuterXml, cNode.InnerXml).Body + "</div></div>"); _tagHtml.TotalCarousel = _tagHtml.TotalCarousel + 1; } _tagHtml.Body = sbCarousel.ToString(); } } return(_tagHtml); }
/// <summary> /// Given a request containing user input, produces a result from the bot /// </summary> /// <param name="request">the request from the user</param> /// <returns>the result to be output to the user</returns> public Result Chat(Request request) { Result result = new Result(request.user, this, request); bool IsAddResult = true; if (this.isAcceptingUserInput) { // Normalize the input AIMLLoader loader = new AIMLLoader(this); AIMLbot.Normalize.SplitIntoSentences splitter = new AIMLbot.Normalize.SplitIntoSentences(this); string[] rawSentences = splitter.Transform(request.rawInput); foreach (string sentence in rawSentences) { result.InputSentences.Add(sentence); string path = loader.generatePath(sentence, request.user.getLastBotOutput(), request.user.Topic, true); result.NormalizedPaths.Add(path); } // grab the templates for the various sentences from the graphmaster foreach (string path in result.NormalizedPaths) { Utils.SubQuery query = new SubQuery(path); query.Template = this.Graphmaster.evaluate(path, query, request, MatchState.UserInput, new StringBuilder()); result.SubQueries.Add(query); } // process the templates into appropriate output foreach (SubQuery query in result.SubQueries) { if (query.Template.Length > 0) { try { XmlNode templateNode = AIMLTagHandler.getNode(query.Template); string outputSentence = this.processNode(templateNode, query, request, result, request.user); if (outputSentence.Length > 0) { if (outputSentence.Contains("[notadd]")) { outputSentence = outputSentence.Replace("[notadd]", ""); IsAddResult = false; } result.OutputSentences.Add(outputSentence); } } catch (Exception e) { if (this.WillCallHome) { this.phoneHome(e.Message, request); } this.writeToLog("WARNING! A problem was encountered when trying to process the input: " + request.rawInput + " with the template: \"" + query.Template + "\""); } } } } else { result.OutputSentences.Add(this.NotAcceptingUserInputMessage); } // populate the Result object result.Duration = DateTime.Now - request.StartedOn; if (IsAddResult) { request.user.addResult(result); } return(result); }
// Token: 0x0600008F RID: 143 RVA: 0x00005AE0 File Offset: 0x00004AE0 private string processNode(XmlNode node, SubQuery query, Request request, Result result, User user) { if (request.StartedOn.AddMilliseconds(request.bot.TimeOut) < DateTime.Now) { request.bot.writeToLog(string.Concat(new string[] { "WARNING! Request timeout. User: "******" raw input: \"", request.rawInput, "\" processing template: \"", query.Template, "\"" })); request.hasTimedOut = true; return(string.Empty); } string text = node.Name.ToLower(); if (text == "template") { StringBuilder stringBuilder = new StringBuilder(); if (node.HasChildNodes) { foreach (object obj in node.ChildNodes) { XmlNode node2 = (XmlNode)obj; stringBuilder.Append(this.processNode(node2, query, request, result, user)); } } return(stringBuilder.ToString()); } AIMLTagHandler aimltagHandler = null; aimltagHandler = this.getBespokeTags(user, query, request, result, node); if (object.Equals(null, aimltagHandler)) { string key; switch (key = text) { case "bot": aimltagHandler = new bot(this, user, query, request, result, node); goto IL_53F; case "condition": aimltagHandler = new condition(this, user, query, request, result, node); goto IL_53F; case "date": aimltagHandler = new date(this, user, query, request, result, node); goto IL_53F; case "formal": aimltagHandler = new formal(this, user, query, request, result, node); goto IL_53F; case "gender": aimltagHandler = new gender(this, user, query, request, result, node); goto IL_53F; case "get": aimltagHandler = new get(this, user, query, request, result, node); goto IL_53F; case "gossip": aimltagHandler = new gossip(this, user, query, request, result, node); goto IL_53F; case "id": aimltagHandler = new id(this, user, query, request, result, node); goto IL_53F; case "input": aimltagHandler = new input(this, user, query, request, result, node); goto IL_53F; case "javascript": aimltagHandler = new javascript(this, user, query, request, result, node); goto IL_53F; case "learn": aimltagHandler = new learn(this, user, query, request, result, node); goto IL_53F; case "lowercase": aimltagHandler = new lowercase(this, user, query, request, result, node); goto IL_53F; case "person": aimltagHandler = new person(this, user, query, request, result, node); goto IL_53F; case "person2": aimltagHandler = new person2(this, user, query, request, result, node); goto IL_53F; case "random": aimltagHandler = new random(this, user, query, request, result, node); goto IL_53F; case "sentence": aimltagHandler = new sentence(this, user, query, request, result, node); goto IL_53F; case "set": aimltagHandler = new set(this, user, query, request, result, node); goto IL_53F; case "size": aimltagHandler = new size(this, user, query, request, result, node); goto IL_53F; case "sr": aimltagHandler = new sr(this, user, query, request, result, node); goto IL_53F; case "srai": aimltagHandler = new srai(this, user, query, request, result, node); goto IL_53F; case "star": aimltagHandler = new star(this, user, query, request, result, node); goto IL_53F; case "system": aimltagHandler = new system(this, user, query, request, result, node); goto IL_53F; case "that": aimltagHandler = new that(this, user, query, request, result, node); goto IL_53F; case "thatstar": aimltagHandler = new thatstar(this, user, query, request, result, node); goto IL_53F; case "think": aimltagHandler = new think(this, user, query, request, result, node); goto IL_53F; case "topicstar": aimltagHandler = new topicstar(this, user, query, request, result, node); goto IL_53F; case "uppercase": aimltagHandler = new uppercase(this, user, query, request, result, node); goto IL_53F; case "version": aimltagHandler = new version(this, user, query, request, result, node); goto IL_53F; } aimltagHandler = null; } IL_53F: if (object.Equals(null, aimltagHandler)) { return(node.InnerText); } if (aimltagHandler.isRecursive) { if (node.HasChildNodes) { foreach (object obj2 in node.ChildNodes) { XmlNode xmlNode = (XmlNode)obj2; if (xmlNode.NodeType != XmlNodeType.Text) { xmlNode.InnerXml = this.processNode(xmlNode, query, request, result, user); } } } return(aimltagHandler.Transform()); } string str = aimltagHandler.Transform(); XmlNode node3 = AIMLTagHandler.getNode("<node>" + str + "</node>"); if (node3.HasChildNodes) { StringBuilder stringBuilder2 = new StringBuilder(); foreach (object obj3 in node3.ChildNodes) { XmlNode node4 = (XmlNode)obj3; stringBuilder2.Append(this.processNode(node4, query, request, result, user)); } return(stringBuilder2.ToString()); } return(node3.InnerXml); }
// Token: 0x0600008E RID: 142 RVA: 0x000058A4 File Offset: 0x000048A4 public Result Chat(Request request) { Result result = new Result(request.user, this, request); if (this.isAcceptingUserInput) { AIMLLoader aimlloader = new AIMLLoader(this); SplitIntoSentences splitIntoSentences = new SplitIntoSentences(this); string[] array = splitIntoSentences.Transform(request.rawInput); foreach (string text in array) { result.InputSentences.Add(text); string item = aimlloader.generatePath(text, request.user.getLastBotOutput(), request.user.Topic, true); result.NormalizedPaths.Add(item); } foreach (string text2 in result.NormalizedPaths) { SubQuery subQuery = new SubQuery(text2); subQuery.Template = this.Graphmaster.evaluate(text2, subQuery, request, MatchState.UserInput, new StringBuilder()); result.SubQueries.Add(subQuery); } using (List <SubQuery> .Enumerator enumerator2 = result.SubQueries.GetEnumerator()) { while (enumerator2.MoveNext()) { SubQuery subQuery2 = enumerator2.Current; if (subQuery2.Template.Length > 0) { try { XmlNode node = AIMLTagHandler.getNode(subQuery2.Template); string text3 = this.processNode(node, subQuery2, request, result, request.user); if (text3.Length > 0) { result.OutputSentences.Add(text3); } } catch (Exception ex) { if (this.WillCallHome) { this.phoneHome(ex.Message, request); } this.writeToLog(string.Concat(new string[] { "WARNING! A problem was encountered when trying to process the input: ", request.rawInput, " with the template: \"", subQuery2.Template, "\"" })); } } } goto IL_1E4; } } result.OutputSentences.Add(this.NotAcceptingUserInputMessage); IL_1E4: result.Duration = DateTime.Now - request.StartedOn; request.user.addResult(result); return(result); }