Esempio n. 1
0
 public App()
 {
     var bootstrapper = new WindsorApplicationBootstrapper <Presentation.MainView>()
                        .OnBootCompleted(serviceProvider =>
     {
         ((ServiceProviderWrapper)serviceProvider)
         .Container
         .ResolveAll <IPluginDefinition>()
         .OrderBy(plugin => plugin.Name)
         .ForEach(plugin => plugin.Initialize());
     });
 }
Esempio n. 2
0
        public App()
        {
            var bootstrapper = new WindsorApplicationBootstrapper <Presentation.MainView>()
                               .EnableSplashScreen()
                               .OnBoot(container =>
            {
                var conventions = container.GetService <IConventionsHandler>();

                /*
                 * the following will make every ViewModel
                 * appear as a resource in bound Views
                 * --> conventions.ShouldExposeViewModelAsStaticResource = (view, viewModel) => true;
                 */
                conventions.ShouldExposeViewModelAsStaticResource = (view, viewModel) =>
                {
                    return((viewModel.GetType() == typeof(SampleViewModelAsResourceViewModel))
                        ? true
                        : conventions.DefaultShouldExposeViewModelAsStaticResource(view, viewModel));
                };

                var w = (ServiceProviderWrapper)container;
                w.Container.AddFacility <TypedFactoryFacility>();
            });
        }
Esempio n. 3
0
 public App()
 {
     var bootstrapper = new WindsorApplicationBootstrapper <Presentation.MainView>();
 }
Esempio n. 4
0
		public App()
		{
			ServicePointManager.DefaultConnectionLimit = 10;

			var bootstrapper = new WindsorApplicationBootstrapper<MainView>();
		}
Esempio n. 5
0
        public App()
        {
            ServicePointManager.DefaultConnectionLimit = 10;

            var bootstrapper = new WindsorApplicationBootstrapper <MainView>();
        }