apply fix on Background Service Registerar in DI Extension ...
This commit is contained in:
@@ -10,15 +10,13 @@ namespace xCommons.Extensions
|
||||
/// </summary>
|
||||
/// <typeparam name="TService"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="service"></param>
|
||||
public static void AddXBackgroundService<TService>(
|
||||
this IServiceCollection source,
|
||||
TService service
|
||||
this IServiceCollection source
|
||||
)
|
||||
where TService : XBackgroundService
|
||||
{
|
||||
//
|
||||
source.AddSingleton(service);
|
||||
source.AddSingleton<TService>();
|
||||
source.AddHostedService<TService>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user