Example #1
0
        static void Main()
        {
            var       container = ObjectFactory.CreateContainer();
            var       bus       = new CommandBus(container);
            string    s         = null;
            const int testCount = 10 * 10000;

            for (int i = 0; i < 5; i++)
            {
                CodeTimer.TimeLine("Call", testCount, x => s    = bus.Call(new TestCommand()));
                CodeTimer.TimeLine("Execute", testCount, x => s = bus.Execute(new TestCommand()).Result);
                Console.WriteLine();
            }
            Console.ReadLine();
        }