public Guide(IConnection connection, ICommandHandler commandHandler, ServicesBootstrapper servicesBootstrapper, HelperRoleHandler helperRoleHandler) { this.connection = connection; this.commandHandler = commandHandler; this.servicesBootstrapper = servicesBootstrapper; this.helperRoleHandler = helperRoleHandler; }
public void Register_WithContainer_RegistersClock() { var bootstrapper = new ServicesBootstrapper(); var container = ContainerFactory.Bootstrap <EmptyServicesBootstrapper>(); bootstrapper.Bootstrap(container); Assert.That(container.Resolve <IClock>(), Is.Not.Null); }
public static void Register(IMutableDependencyResolver services, IReadonlyDependencyResolver resolver, DataAccessConfiguration dataAccessConfig) { EnvironmentServicesBootstrapper.RegisterEnvironmentServices(services, resolver); ConfigurationBootstrapper.RegisterConfiguration(services, resolver, dataAccessConfig); LoggingBootstrapper.RegisterLogging(services, resolver); AvaloniaServicesBootstrapper.RegisterAvaloniaServices(services); FileSystemWatcherServicesBootstrapper.RegisterFileSystemWatcherServices(services, resolver); DataAccessBootstrapper.RegisterDataAccess(services, resolver); ServicesBootstrapper.RegisterServices(services, resolver); ViewModelsBootstrapper.RegisterViewModels(services, resolver); }
public ApiBootstrapper(string functionName) { DependencyInjection.Initialize(builder => { RegisterLogging(builder); var dbConfig = GetDatabaseConfig(builder); builder.RegisterInstance(dbConfig); //var someSetting = GetSomeSetting(); //builder.RegisterInstance(someSetting); ServicesBootstrapper.Register(builder, dbConfig); }, functionName); }
private void RegisterServices(IServiceCollection services) { ServicesBootstrapper.RegisterServices(services, Configuration); }
public void Register_NullContainer_ThrowsArgumentNullException() { var bootstrapper = new ServicesBootstrapper(); Assert.Throws <ArgumentNullException>(() => bootstrapper.Bootstrap(null)); }