using Microsoft.Extensions.DependencyInjection;
using xCommons.Providers;
namespace xCommons.Extensions
{
public static class BackgroundServiceExtensions
{
///
/// Register Background Services ...
///
///
///
///
public static void AddXBackgroundService(
this IServiceCollection source,
TService service
)
where TService : XBackgroundService
{
//
source.AddSingleton(service);
source.AddHostedService();
}
}
}