static void Main(string[] args)
        {
            // Configure
            CompositionRoot = ProgramConfig.Configure();

            // Resolve dependencies and run the ConsoleTwitterApp
            CompositionRoot.Resolve <ConsoleTwitterApp>().Run();
        }
示例#2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            SplashScreen splash = new SplashScreen("Resources/Images/Splash.jpg");

            splash.Show(true, true);

            base.OnStartup(e);

            var container = ProgramConfig.Configure();

            using (var scope = container.BeginLifetimeScope())
            {
                var        vm     = scope.Resolve <IMainViewModel>();
                MainWindow window = new MainWindow(vm);
                window.Show();
            }
        }