Skip to content

Commit d46793b

Browse files
feature(#22): this commit removes the private scope factory field and directly uses the scope factory parameter in the constructor and in internal references.
1 parent a6c2951 commit d46793b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Applications/Backend/Source/HttpsRichardy.Federation.WebApi/Workers/KeyRotationBackgroundService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
namespace HttpsRichardy.Federation.WebApi.Workers;
22

3-
public sealed class KeyRotationBackgroundService(IServiceScopeFactory _scopeFactory, ILogger<KeyRotationBackgroundService> logger) : BackgroundService
3+
public sealed class KeyRotationBackgroundService(IServiceScopeFactory scopeFactory, ILogger<KeyRotationBackgroundService> logger) : BackgroundService
44
{
55
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
66
{
77
while (!stoppingToken.IsCancellationRequested)
88
{
9-
using var scope = _scopeFactory.CreateScope();
9+
using var scope = scopeFactory.CreateScope();
1010

1111
var rotationService = scope.ServiceProvider.GetRequiredService<ISecretRotationService>();
1212
var realmCollection = scope.ServiceProvider.GetRequiredService<IRealmCollection>();

0 commit comments

Comments
 (0)