public void ConfigureServices(IServiceCollection services) { _serviceConllection = services; _bootstrapper = Bootstrapper .Configure() .UseNetCoreDI(_serviceConllection); var mvc = _serviceConllection .EnableHopCorsMode() .AddMvc(OnAddMvc); if (DocumentationEnabled && SwaggerOptions != null) { _serviceConllection.AddSwaggerGen(SwaggerOptions); } _serviceConllection.AddScoped <IDateProvider, DateProvider>(); AddServices(_serviceConllection); var register = _bootstrapper .UseDomainNotifications() .RegisterModule(ConfigureModules); _serviceConllection.AddScoped <IDispatcher, Dispatcher>(); var hostConfiguration = new HostConfiguration(Dns.GetHostName()); _serviceConllection .AddSingleton <IHostConfiguration>((a) => hostConfiguration); }
public static IBootstrapperModules UseDomainNotifications(this IBootstrapperModules bootstrapperModules) { bootstrapperModules.RegisterModule <DomainModule>(); return(bootstrapperModules); }