コード例 #1
0
        public static string FindMostCommon(string input)
        {
            if (Options.Output)
            {
                Console.WriteLine("FindMostCommon");
            }

            if (Options.ShouldThrowException)
            {
                ThrowException();
            }

            return(WordFinder.FindMostCommonWord(input));
        }
コード例 #2
0
        public static async Task <string> FindMostCommonAsync(string input)
        {
            if (Options.Output)
            {
                Console.WriteLine("FindMostCommonAsync");
            }

            await Task.Delay(Options.Delay);

            if (Options.ShouldThrowException)
            {
                ThrowException();
            }

            return(WordFinder.FindMostCommonWord(input));
        }