ResourceMonitoringServiceCollectionExtensions.AddResourceMonitoring 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddResourceMonitoring(IServiceCollection) |
配置实现并将其添加到 IResourceMonitor 服务集合。 |
AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>) |
配置实现并将其添加到 IResourceMonitor 服务集合。 |
AddResourceMonitoring(IServiceCollection)
配置实现并将其添加到 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
的值。
例外
services
为 null
。
适用于
AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>)
配置实现并将其添加到 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
要向其添加监视器的依赖项注入容器。
- configure
- Action<IResourceMonitorBuilder>
委托以配置 IResourceMonitorBuilder。
返回
services
的值。
例外
services
或 configure
为 null
。