public static ISImplHostBuilder UseCqrsInMemoryEventDispatcher(this ISImplHostBuilder host) { var module = host.AttachNewOrGetConfiguredModule(() => new EventModule(new EventModuleConfig())); module.Config.EnableInMemoryEventDispatcher = true; return(host); }
public static ISImplHostBuilder UseCqrsEvents(this ISImplHostBuilder host, Action <EventModuleConfig> configureDelegate = null) { var module = host.AttachNewOrGetConfiguredModule(() => new EventModule(new EventModuleConfig())); configureDelegate?.Invoke(module.Config); return(host); }
public static ISImplHostBuilder UseRedis(this ISImplHostBuilder host, Action <RedisConfig> configureDelegate) { var module = host.AttachNewOrGetConfiguredModule(() => new RedisModule(new RedisConfig())); configureDelegate?.Invoke(module.Config); return(host); }
public static ISImplHostBuilder UseCqrsMessagingCommandDispatcher(this ISImplHostBuilder host, Action <MessagingCqrsModuleConfig> configureDelegate) { var module = host.AttachNewOrGetConfiguredModule(() => new MessagingCqrsModule(new MessagingCqrsModuleConfig())); configureDelegate?.Invoke(module.Config); return(host); }
public static ISImplHostBuilder UseTransactionalRequests(this ISImplHostBuilder host, Action <HttpStorageModuleConfig> configureDelegate = null) { var module = host.AttachNewOrGetConfiguredModule(() => new HttpStorageModule(new HttpStorageModuleConfig())); configureDelegate?.Invoke(module.Config); return(host); }
public static ISImplHostBuilder UseNPocoRepositoryStorage(this ISImplHostBuilder host, Action <NPocoRepositoryConfig> dapperRepoConfig = null) { var config = new NPocoRepositoryConfig(); dapperRepoConfig?.Invoke(config); host.AttachNewOrGetConfiguredModule(() => new NPocoRepositoryModule(config)); return(host); }
private static HttpOAuthConfig Attach(ISImplHostBuilder simplHostBuilder) { var config = new HttpOAuthConfig(simplHostBuilder); var oauthModule = new HttpOAuthModule(config); simplHostBuilder.AttachNewOrGetConfiguredModule(() => oauthModule); return(config); }
private static ExamineConfig AttachModule(ISImplHostBuilder simplHostBuilder) { var config = new ExamineConfig(); var module = new ExamineModule(config); simplHostBuilder.AttachNewOrGetConfiguredModule <ExamineModule>(() => module); return(config); }
public static ISImplHostBuilder UseDependencyInjection(this ISImplHostBuilder host, Action <DependencyInjectionConfig> queueConfig) { var config = new DependencyInjectionConfig(); queueConfig.Invoke(config); var module = host.AttachNewOrGetConfiguredModule(() => new DependencyInjectionModule(config)); return(host); }
public static ISImplHostBuilder UseInMemoryQueues(this ISImplHostBuilder host, Action <QueueModuleConfig> queueConfig) { var config = new QueueModuleConfig(); queueConfig.Invoke(config); var module = host.AttachNewOrGetConfiguredModule(() => new QueueModule(config)); module.Config.EnableInMemoryQueueManager = true; return(host); }
public static void ConfigureWebHostStackApp(this ISImplHostBuilder hostBuilder, Action <IWebHostBuilder> configureDelegate) { // Configure Generic host var startupConfiguration = new WebHostStartupConfiguration(); var applicationHostBuilder = new WebHostBuilder(startupConfiguration); configureDelegate?.Invoke(applicationHostBuilder); // Get startup and application builder var startup = startupConfiguration.GetConfiguredStartup(); var stackApplicationBuilder = RuntimeServices.Current.BootContainer.New <WebHostApplicationBuilder>(); // attach application hostBuilder.AttachNewOrGetConfiguredModule(() => new WebHostStackApplicationModule(stackApplicationBuilder, startup.ConfigureStackApplication, startup.ConfigureServices)); }
public static ISImplHostBuilder ConfigureWebHostStackApp(this ISImplHostBuilder hostBuilder, Action <IWebHostBuilder> configureDelegate = null) { // Configure Generic host var startupConfiguration = new WebHostStartupConfiguration(); var applicationHostBuilder = RuntimeServices.Current.BootContainer.New <WebHostBuilder>(new Dictionary <Type, object> { [typeof(WebHostStartupConfiguration)] = startupConfiguration }); configureDelegate?.Invoke(applicationHostBuilder); // Get startup and application builder var startup = startupConfiguration.GetConfiguredStartup(); var stackApplicationBuilder = RuntimeServices.Current.BootContainer.New <WebHostApplicationBuilder>(); // attach application hostBuilder.AttachNewOrGetConfiguredModule(() => new WebHostStackApplicationModule(stackApplicationBuilder, startup.ConfigureStackApplication, startup.ConfigureServices)); return(hostBuilder); }
public static ISImplHostBuilder UseCqrsMessagingCommandDispatcher(this ISImplHostBuilder host) { host.AttachNewOrGetConfiguredModule(() => new MessagingCqrsModule()); return(host); }
public TModule AttachNewOrGetConfiguredModule <TModule>(Func <TModule> factory) where TModule : ISImplModule { return(_hostBuilder.AttachNewOrGetConfiguredModule(factory)); }
public static ISImplHostBuilder UseInMemoryRepositoryStorage(this ISImplHostBuilder host) { host.AttachNewOrGetConfiguredModule(() => new RepositoryModule()); return(host); }
public static TModule AttachNewOrGetConfiguredModule <TModule>(this ISImplHostBuilder stackHostBuilder) where TModule : ISImplModule, new() { return(stackHostBuilder.AttachNewOrGetConfiguredModule(() => new TModule())); }
public static ISImplHostBuilder UseInMemoryKeyValueStorage(this ISImplHostBuilder host) { host.AttachNewOrGetConfiguredModule(() => new KeyValueModule()); return(host); }
public static TModule AttachNewOrGetConfiguredModule <TModule>(this ISImplHostBuilder stackHostBuilder, TModule module) where TModule : ISImplModule { return(stackHostBuilder.AttachNewOrGetConfiguredModule(() => module)); }