Skip to content

Commit

Permalink
Add default initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
MH321Productions committed Jan 29, 2024
1 parent 00502b4 commit 8e9d4a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public FilesDbContext(DbContextOptions<FilesDbContext> options) : base(options)

public FilesDbContext(DbContextOptions<FilesDbContext> options, IServiceProvider serviceProvider) : base(options, serviceProvider) { }

public DbSet<File> FileMetadata { get; set; }
public DbSet<File> FileMetadata { get; set; } = null!;

protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public SanityCheck(IDataSource dataSource, IReporter reporter)
{
_dataSource = dataSource;
_reporter = reporter;
_databaseIds = [];
_blobIds = [];
}

public async Task Run(CancellationToken cancellationToken)
Expand Down
4 changes: 3 additions & 1 deletion Modules/Files/src/Files.Jobs.SanityCheck/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public Worker(IHostApplicationLifetime host, IServiceScopeFactory serviceScopeFa
{
_host = host;
_serviceScopeFactory = serviceScopeFactory;
_dataSource = null!;
_reporter = null!;
}

public async Task StartAsync(CancellationToken cancellationToken)
Expand All @@ -33,7 +35,7 @@ public Task StopAsync(CancellationToken cancellationToken)
return Task.CompletedTask;
}

public async Task RunSanityCheck(CancellationToken cancellationToken)
private async Task RunSanityCheck(CancellationToken cancellationToken)
{
var sanityCheck = new Infrastructure.SanityCheck.SanityCheck(_dataSource, _reporter);

Expand Down

0 comments on commit 8e9d4a7

Please sign in to comment.