예제 #1
0
        /// <summary>
        ///     Start the command bus example.
        /// </summary>
        public static void Main()
        {
            Console.WriteLine("==== [StructureMap] ====");

            try
            {
                Task.Factory.StartNew(StructureMapExample.Go).Wait();
            }
            catch (Exception ex1)
            {
                Console.WriteLine("Exception - " + ex1.Message);
            }

            RegisterUserCommandHandler.ResetUsers();

            Console.WriteLine("==== [Autofac] ====");

            try
            {
                Task.Factory.StartNew(AutofacExample.Go).Wait();
            }
            catch (Exception ex1)
            {
                Console.WriteLine("Exception - " + ex1.Message);
            }

            Console.WriteLine("Press Enter to exit...");
            Console.ReadLine();
        }