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)
26/// Configures and adds an <see cref="IResourceMonitor"/> implementation to a service collection. 40/// 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)
44var trackerService = provider.GetRequiredService<IResourceMonitor>(); 48Assert.IsAssignableFrom<IResourceMonitor>(trackerService); 60var trackerService = provider.GetRequiredService<IResourceMonitor>(); 64Assert.IsAssignableFrom<IResourceMonitor>(trackerService); 85Assert.IsAssignableFrom<IResourceMonitor>(trackerService); 103var tracker = host.Services.GetService<IResourceMonitor>(); 196var trackers = host.Services.GetServices<IResourceMonitor>().ToArray(); 199var tracker = Assert.Single(trackers);