ResourceMonitoringServiceCollectionExtensions.AddResourceMonitoring 方法

定义

重载

AddResourceMonitoring(IServiceCollection)

配置实现并将其添加到 IResourceMonitor 服务集合。

AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>)

配置实现并将其添加到 IResourceMonitor 服务集合。

AddResourceMonitoring(IServiceCollection)

Source:
ResourceMonitoringServiceCollectionExtensions.cs

配置实现并将其添加到 IResourceMonitor 服务集合。

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

参数

services
IServiceCollection

要向其添加监视器的依赖项注入容器。

返回

services 的值。

例外

servicesnull

适用于

AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>)

Source:
ResourceMonitoringServiceCollectionExtensions.cs

配置实现并将其添加到 IResourceMonitor 服务集合。

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

参数

services
IServiceCollection

要向其添加监视器的依赖项注入容器。

返回

services 的值。

例外

servicesconfigurenull

适用于