Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes some build issues #1952

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/HealthChecks.UI.Data/HealthChecksDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@ namespace HealthChecks.UI.Data
{
public class HealthChecksDb : DbContext
{
public DbSet<HealthCheckConfiguration> Configurations { get; set; }
public DbSet<HealthCheckConfiguration> Configurations => Set<HealthCheckConfiguration>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this done?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, false positive. I will close the PR


public DbSet<HealthCheckExecution> Executions { get; set; }
public DbSet<HealthCheckExecution> Executions => Set<HealthCheckExecution>();

public DbSet<HealthCheckFailureNotification> Failures { get; set; }
public DbSet<HealthCheckFailureNotification> Failures => Set<HealthCheckFailureNotification>();

public DbSet<HealthCheckExecutionEntry> HealthCheckExecutionEntries { get; set; }
public DbSet<HealthCheckExecutionEntry> HealthCheckExecutionEntries => Set<HealthCheckExecutionEntry>();

public DbSet<HealthCheckExecutionHistory> HealthCheckExecutionHistories { get; set; }
public DbSet<HealthCheckExecutionHistory> HealthCheckExecutionHistories => Set<HealthCheckExecutionHistory>();

protected HealthChecksDb(DbContextOptions options) : base(options)
{
}

#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public HealthChecksDb(DbContextOptions<HealthChecksDb> options) : base(options)
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ internal class UIApiRequestLimitingMidleware
{
private readonly RequestDelegate _next;
private readonly IOptions<Settings> _settings;
private readonly ILogger<UIApiEndpointMiddleware> _logger;
private readonly ILogger<UIApiRequestLimitingMidleware> _logger;
private readonly SemaphoreSlim _semaphore;

public UIApiRequestLimitingMidleware(RequestDelegate next, IOptions<Settings> settings, ILogger<UIApiEndpointMiddleware> logger)
public UIApiRequestLimitingMidleware(RequestDelegate next, IOptions<Settings> settings, ILogger<UIApiRequestLimitingMidleware> logger)
{
_next = Guard.ThrowIfNull(next);
_settings = Guard.ThrowIfNull(settings);
Expand Down
Loading