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