示例#1
0
        static void ContainerTest()
        {
            var container = ContainerConfig.Configure();

            using (var scope = container.BeginLifetimeScope())
            {
                var app = scope.Resolve <IApplication>();
                app.Run();
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            var container = ContainerConfig.Configure();

            using (var scope = container.BeginLifetimeScope()) {
                var app = scope.Resolve <IApplication>();
                app.Run();
            }

            Console.ReadLine();
        }
示例#3
0
        static void Main(string[] args)
        {
            IContainer container = ContainerConfig.Configure();

            using (ILifetimeScope scope = container.BeginLifetimeScope())
            {
                Engine app = scope.Resolve <Engine>();
                app.Run();
            }
            Console.ReadLine();
        }