public static BlasticApplication AddProgramDatabase( this BlasticApplication application, DatabaseProvider databaseProvider, string connectionString) { return(application.Configure(builder => { DatabaseConfiguration databaseConfiguration = new DatabaseConfiguration(databaseProvider, connectionString); builder.RegisterInstance(databaseConfiguration); builder .RegisterType <ConnectionFactory>() .SingleInstance(); builder .RegisterType <ProgramDatabase>() .SingleInstance(); builder .RegisterType <MigrateProgramDatabaseStep>() .SingleInstance() .As <IInitializationStep>(); })); }
private static BlasticApplication AddDefaultServices(this BlasticApplication application) { return(application.Configure(builder => { builder .RegisterType <ExecutionContextFactory>() .SingleInstance(); builder .RegisterType <DialogService>() .As <IDialogService>() .SingleInstance(); builder .RegisterType <WindowManager>() .As <IWindowManager>() .SingleInstance(); builder .RegisterType <EventAggregator>() .As <IEventAggregator>() .SingleInstance(); builder .RegisterType <SnackbarMessageQueue>() .As <ISnackbarMessageQueue>() .SingleInstance(); })); }
public static BlasticApplication AddSettingsService(this BlasticApplication application) { return(application.Configure(builder => { builder.RegisterType <SettingsService>() .SingleInstance() .As <ISettingsService>(); })); }
public static BlasticApplication RegisterMainTab <T>(this BlasticApplication application) where T : IMainTab { return(application.Configure(builder => { builder.RegisterType <T>() .SingleInstance() .As <IMainTab>(); })); }
private static BlasticApplication AddLogging(this BlasticApplication application, LogLevel minimumLogLevel = LogLevel.Trace) { return(application.Configure(x => { x.AddLogging(builder => { builder.SetMinimumLevel(minimumLogLevel); builder.AddSerilog(); }); })); }
public static BlasticApplication AddSettingsWindow(this BlasticApplication application) { return(application.Configure(builder => { builder .RegisterType <SettingsViewModel>() .SingleInstance(); builder.RegisterType <ReadSettingsStep>() .SingleInstance() .As <IInitializationStep>(); })); }
public static BlasticApplication AddLogsWindow(this BlasticApplication application) { return(application.Configure(builder => { builder .RegisterType <LogsViewModel>() .SingleInstance(); builder .RegisterType <LogSink>() .SingleInstance(); builder .RegisterType <LogSettingsViewModel>() .SingleInstance() .AsImplementedInterfaces() .AsSelf(); })); }