共用方式為


ResilienceServiceCollectionExtensions.AddResilienceEnricher 方法

定義

新增復原擴充器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddResilienceEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResilienceEnricher (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddResilienceEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddResilienceEnricher (services As IServiceCollection) As IServiceCollection

參數

services
IServiceCollection

服務。

傳回

輸入 services

例外狀況

servicesnull

備註

這個方法會在內建至 Polly 連結庫的預設維度之上新增其他維度。 其中包括:

適用於