Skip to content

Commit

Permalink
Use HashSet
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdenny committed Sep 24, 2024
1 parent 7a29a1f commit 6393f39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/Health/ResourceHealthCheckScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal class ResourceHealthCheckScheduler : BackgroundService
private readonly ResourceNotificationService _resourceNotificationService;
private readonly DistributedApplicationModel _model;
private readonly Dictionary<string, bool> _checkEnablement = new();
private readonly List<string> _healthyResources = new();
private readonly HashSet<string> _healthyResources = new();

public ResourceHealthCheckScheduler(ResourceNotificationService resourceNotificationService, DistributedApplicationModel model, IDistributedApplicationEventing eventing)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Aspire.Hosting.Health;

internal class ResourceNotificationHealthCheckPublisher(DistributedApplicationModel model, ResourceNotificationService resourceNotificationService, IDistributedApplicationEventing eventing, IServiceProvider services) : IHealthCheckPublisher
{
private readonly List<string> _alreadyHealthy = new();
private readonly HashSet<string> _alreadyHealthy = new();

public async Task PublishAsync(HealthReport report, CancellationToken cancellationToken)
{
Expand Down

0 comments on commit 6393f39

Please # to comment.