File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ public static class BackgroundQueueRegistrar
1212 /// <summary>
1313 /// Tries to register a high-performance background Task/ValueTask queue (Singleton) as a HostedService
1414 /// </summary>
15- public static void AddBackgroundQueue ( this IServiceCollection services )
15+ public static IServiceCollection AddBackgroundQueueAsSingleton ( this IServiceCollection services )
1616 {
1717 services . TryAddSingleton < IQueuedHostedService , QueuedHostedService > ( ) ;
1818 services . AddHostedService ( svc => svc . GetService < IQueuedHostedService > ( ) ! ) ; // TODO: TryAdd for HostedService
1919 services . TryAddSingleton < IBackgroundQueue , BackgroundQueue > ( ) ;
2020 services . TryAddSingleton < IQueueInformationUtil , QueueInformationUtil > ( ) ;
21+
22+ return services ;
2123 }
2224}
You can’t perform that action at this time.
0 commit comments