cf439c5006
continuous-integration/drone/pr Build is passing
Resolved mediator source geenrator conflict with tests
14 lines
417 B
C#
14 lines
417 B
C#
namespace LiteCharms.Features.Extensions;
|
|
|
|
public static class TaskCancellation
|
|
{
|
|
public static IServiceCollection AddCancellationToken(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<CancellationTokenProvider>();
|
|
services.AddScoped(typeof(CancellationToken),
|
|
provider => provider.GetRequiredService<CancellationTokenProvider>().Token);
|
|
|
|
return services;
|
|
}
|
|
}
|