Esempio n. 1
0
 static void Main(string[] args)
 {
     var c = new Context("+");
     var d = c.GetResult(1, 4);
     Console.WriteLine(d);
     Console.ReadKey();
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var c = new Context("+");
            var d = c.GetResult(1, 4);

            Console.WriteLine(d);
            Console.ReadKey();
        }
Esempio n. 3
0
        /// <summary>
        /// 这种方式对于客户端来说, 只暴露了context类, 对于算法核心部分根本不用了解.
        /// 很好的解耦了client, context, algorithm三个类.
        /// </summary>
        /// <param name="args"></param>
        public static void Runner()
        {
            Context context = new Context("normal");

            Console.WriteLine(context.GetResult(1000));
        }