public static ContainerBuilder AddModule(this ContainerBuilder builder, Module.Configurations configurations, IEventBus eventBus) { builder.Register <Module>(ctx => new UserAccountModule(configurations, eventBus)).SingleInstance(); return(builder); }
public UserAccountDataContext(Module.Configurations configuration) { this._schema = "UserAccount"; this._configuration = configuration; this._connectionString = configuration.DataConnectionString; base.Database.Migrate(); }
public UserAccountDataContext CreateDbContext(string[] args) { var configurations = new Module.Configurations { DefaultAccount = new Module.Configurations.DefaultUserAccount { Name = "Admin", Password = "******", Email = "*****@*****.**", }, DataConnectionString = args[0] }; return(new UserAccountDataContext(configurations)); }
public GenerateNewPasswordAutofacModule(Module.Configurations configurations, IEventBus eventBus) { this._configurations = configurations ?? throw new System.ArgumentNullException(nameof(configurations)); this._eventBus = eventBus ?? throw new System.ArgumentNullException(nameof(eventBus)); }
public CreateNewAccountAutofacModule(Module.Configurations configurations, IEventBus eventBus = null) { this._configurations = configurations; this._eventBus = eventBus; }
public NotifyAccountCreationAutofacModule(Module.Configurations configurations) { this._configurations = configurations ?? throw new System.ArgumentNullException(nameof(configurations)); }
public static IServiceCollection AddNotificationsModule(this IServiceCollection services, Module.Configurations configurations, Module.EventsToSubscribe eventsToSubscribe, IEventBus eventBus) { var module = new NotificationModule(configurations, eventsToSubscribe, eventBus); services.AddSingleton(module); return(services); }
public LoginAutofacModule(Module.Configurations configurations, IEventBus eventBus = null) { this._configurations = configurations; }
public static IServiceCollection AddUserAccountModule(this IServiceCollection services, Module.Configurations configurations, IEventBus eventBus) { services.AddSingleton <Module>(provider => new UserAccountModule(configurations, eventBus)); return(services); }