fixed startup
This commit is contained in:
@@ -41,11 +41,12 @@ namespace Hyperbar.Windows
|
||||
isolatedServices.AddTransient<ITemplateGeneratorFactory, TemplateGeneratorFactory>();
|
||||
|
||||
builder.Create(context, isolatedServices);
|
||||
|
||||
}).Build();
|
||||
|
||||
services.AddTransient<IWidgetContext>(provider => new WidgetContext(host.Services));
|
||||
services.AddTransient(provider => host);
|
||||
|
||||
host.Start();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,9 +106,7 @@ public static class IServiceCollectionExtensions
|
||||
{
|
||||
services.Configure<TConfiguration>(configuration);
|
||||
services.AddSingleton<IConfigureOptions<TConfiguration>>(new ConfigureNamedOptions<TConfiguration>("", args => { }));
|
||||
services.AddTransient(provider => {
|
||||
|
||||
return provider.GetService<IOptionsMonitor<TConfiguration>>()!.CurrentValue; });
|
||||
services.AddTransient(provider => provider.GetService<IOptionsMonitor<TConfiguration>>()!.CurrentValue);
|
||||
|
||||
services.AddSingleton<IConfigurationWriter<TConfiguration>>(provider =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user