Exemplo n.º 1
0
        public async Task SortieIntent(IDialogContext context, LuisResult result)
        {
            var           response = context.MakeMessage();
            List <String> parts    = new List <string>();

            parts.Add(String.Format(Utils.RandomSSML("SortieFactionSSML"), CurrentWorldState.sortie.faction));
            parts.Add(String.Format(Utils.RandomSSML("SortieTimeSSML"), Utils.TimeRemaining(CurrentWorldState.sortie.expiry)));
            foreach (Variant variant in CurrentWorldState.sortie.variants)
            {
                parts.Add(String.Format(Utils.RandomSSML("SortieMissionSSML"),
                                        SSMLHelper.SayAs("ordinal", CurrentWorldState.sortie.variants.IndexOf(variant)),
                                        Utils.Article(variant.missionType),
                                        Utils.Article(variant.modifier),
                                        variant.missionType,
                                        variant.modifier
                                        ));
            }
            response.Text = Utils.RandomSSML("SortieSSML");

            response.InputHint = InputHints.ExpectingInput;
            await context.PostAsync(response);

            //context.Wait(MessageReceived);
        }
Exemplo n.º 2
0
 public static string SayAs(string interpretAs, int text)
 {
     return(SSMLHelper.SayAs(interpretAs, text.ToString()));
 }