Compare commits
1
Commits
4697937709
...
c87f80c587
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c87f80c587 |
@@ -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