コード例 #1
0
        private static string PrepareListRegionIntentResponse(TraceWriter log)
        {
            string output = "";

            var data = WhitecaseInformation.ListRegion(log);

            if (data.Count == 0)
            {
                output = "White & Case does not work in any region.";
            }
            else
            {
                output = "The list of regions where White & Case works are as follows: ";

                foreach (var item in data)
                {
                    output = output + item + ", ";
                }

                if (output.EndsWith(", "))
                {
                    output = output.Substring(0, output.Length - 2);
                }
            }



            return(output);
        }
コード例 #2
0
        private static string PrepareListIntentResponse(TraceWriter log, string character)
        {
            string output = "";

            var data = WhitecaseInformation.ListPractice(log, character);

            if (data.Count == 0)
            {
                output = "White & Case does not work in any practice starting with " + character + ".";
            }
            else
            {
                output = "White & Case works in following practices starting with " + character + ": \n";

                foreach (var item in data)
                {
                    output = output + item + ", ";
                }

                if (output.EndsWith(", "))
                {
                    output = output.Substring(0, output.Length - 2);
                }
            }



            return(output);
        }
コード例 #3
0
        private static string PrepareFindCountryIntentResponse(TraceWriter log, string country)
        {
            string output = "";

            var data = WhitecaseInformation.FindCountry(log, country);

            if (data.Count == 0)
            {
                output = $"White & Case does not work in the {country}.";
            }
            else
            {
                output = $"White & Case works in the {data.First()}.";
            }

            return(output);
        }
コード例 #4
0
        private static string PrepareFindIntentResponse(TraceWriter log, string practice)
        {
            string output = "";

            var data = WhitecaseInformation.FindPractice(log, practice);

            if (data.Count == 0)
            {
                output = $"White & Case does not work in the {practice} practice.";
            }
            else
            {
                output = $"White & Case works in the {data.First()} practice.";
            }

            return(output);
        }