Changed all .GetService to .GetRequiredService because no service should be ever missing. However most of these should be removed in one of the future patches.

This commit is contained in:
Kwoth
2021-07-03 01:52:58 +02:00
parent aeb6f8662c
commit 3cc34bfdc3
8 changed files with 12 additions and 12 deletions

View File

@@ -21,7 +21,7 @@ namespace NadekoBot.Coordinator
services.AddGrpc();
services.AddSingleton<CoordinatorRunner>();
services.AddSingleton<IHostedService, CoordinatorRunner>(
serviceProvider => serviceProvider.GetService<CoordinatorRunner>());
serviceProvider => serviceProvider.GetRequiredService<CoordinatorRunner>());
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)