共用方式為


ResourceMonitoringServiceCollectionExtensions.AddResourceMonitoring 方法

定義

多載

AddResourceMonitoring(IServiceCollection)

設定並新增 IResourceMonitor 實作至服務集合。

AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>)

設定並新增 IResourceMonitor 實作至服務集合。

AddResourceMonitoring(IServiceCollection)

來源:
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>)

來源:
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

適用於