示例#1
0
        public static async Task Main(string[] args)
        {
            //string input = "The pipeline pattern is the best pattern";
            //var pipeline = new MyPipeline();
            //Console.Write(pipeline.Execute(input)); // Returns 'True' because 'pattern' is the most common, with 7 characters and it's indeed an odd number
            //UsagePart1.Use();

            //await UsagePartN.Use2();
            UsagePart3.Use();

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
        private static async Task Main()
        {
            const string input    = "The pipeline pattern is the best pattern";
            var          pipeline = new MyPipeline();

            Console.WriteLine(pipeline.Execute(input)); // Returns 'True' because 'pattern' is the most common, with 7 characters and it's indeed an odd number.
            UsagePart1.Use();

            UsagePart2.Use();
            await UsagePart2V2.Use();

            UsagePart3.Use();

            await UsagePart4.Use1();

            await UsagePart4.Use2();

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }