ResourceMonitoringServiceCollectionExtensions.AddResourceMonitoring Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddResourceMonitoring(IServiceCollection) |
Configures and adds an IResourceMonitor implementation to a service collection. |
AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>) |
Configures and adds an IResourceMonitor implementation to a service collection. |
AddResourceMonitoring(IServiceCollection)
Configures and adds an IResourceMonitor implementation to a service collection.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddResourceMonitoring(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResourceMonitoring (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddResourceMonitoring : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddResourceMonitoring (services As IServiceCollection) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container to add the monitor to.
Returns
The value of services
.
Exceptions
services
is null
.
Applies to
AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>)
Configures and adds an IResourceMonitor implementation to a service collection.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddResourceMonitoring(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::ResourceMonitoring::IResourceMonitorBuilder ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResourceMonitoring (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.ResourceMonitoring.IResourceMonitorBuilder> configure);
static member AddResourceMonitoring : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.ResourceMonitoring.IResourceMonitorBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddResourceMonitoring (services As IServiceCollection, configure As Action(Of IResourceMonitorBuilder)) As IServiceCollection
Parameters
- services
- IServiceCollection
The dependency injection container to add the monitor to.
- configure
- Action<IResourceMonitorBuilder>
Delegate to configure IResourceMonitorBuilder.
Returns
The value of services
.
Exceptions
Either services
or configure
is null
.