2 implementations of IResourceMonitor
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
ResourceMonitorService.cs (1)
25internal sealed class ResourceMonitorService : BackgroundService, IResourceMonitor
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Helpers\DummyTracker.cs (1)
8internal class DummyTracker : IResourceMonitor
19 references to IResourceMonitor
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
ResourceMonitorBuilder.cs (1)
21services.TryAddSingleton<IResourceMonitor>(static sp => sp.GetRequiredService<ResourceMonitorService>());
ResourceMonitoringServiceCollectionExtensions.cs (2)
27/// Configures and adds an <see cref="IResourceMonitor"/> implementation to a service collection. 41/// Configures and adds an <see cref="IResourceMonitor"/> implementation to a service collection.
ResourceMonitorService.cs (1)
18/// The implementation of <see cref="IResourceMonitor"/> that computes average resource utilization over a configured period of time.
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (15)
Linux\AcceptanceTest.cs (4)
237var tracker = host.Services.GetService<IResourceMonitor>(); 321var tracker = host.Services.GetService<IResourceMonitor>();
ResourceMonitoringExtensionsTests.cs (11)
46var trackerService = provider.GetRequiredService<IResourceMonitor>(); 50Assert.IsAssignableFrom<IResourceMonitor>(trackerService); 62var trackerService = provider.GetRequiredService<IResourceMonitor>(); 66Assert.IsAssignableFrom<IResourceMonitor>(trackerService); 87Assert.IsAssignableFrom<IResourceMonitor>(trackerService); 105var tracker = host.Services.GetService<IResourceMonitor>(); 198var trackers = host.Services.GetServices<IResourceMonitor>().ToArray(); 201var tracker = Assert.Single(trackers);