private void App_OnStartup(object sender, StartupEventArgs e) { var bootstrapp = BootstrapperFactory.Create(AvailablePatterns.Mvvm, Namespace.FromCurrentCaller()); var mainView = bootstrapp.Boot <IMainView>(); mainView.Display(); }
private void HandleApplicationStartup(object sender, StartupEventArgs e) { var bootstrapper = BootstrapperFactory.Create(BootstrapperType.OrderSystem); if (bootstrapper != default(Bootstrapper)) { bootstrapper.Run(); } }
public void Create_BootstrapperFactory() { //arrange var bootstrapperFactory = new BootstrapperFactory(new Mock <ILogger <Bootstrapper> >().Object); //act var bootstrapper = bootstrapperFactory.Create(TimeSpan.FromMinutes(1)); //assert Assert.NotNull(bootstrapper); }
public static IHostBuilder UseBootstrapperFactory(this IHostBuilder builder, IAssemblyCatalog assemblyCatalog, BootstrapperOptions options, IEnumerable <ModuleMetadataValidator> validators = null) { return(builder.UseServiceProviderFactory(context => { var moduleLoader = new ModuleLoader(validators); options.ConfigureBuildTimeServices.Add(collection => collection.AddSingleton(context.HostingEnvironment)); options.ConfigureBuildTimeServices.Add(collection => collection.AddSingleton(context.Configuration)); return BootstrapperFactory.Create(moduleLoader, assemblyCatalog, options); })); }
public static Bootstrapper CreateDefaultWithout(this BootstrapperFactory factory, string[] args, DefaultFeatures features) => factory.Create(args).AddDefaultsWithout(features);