共用方式為


HttpClientLoggingServiceCollectionExtensions.AddHttpClientLogEnricher<T> 方法

定義

將的 T 擴充器實例加入至 IServiceCollection 以擴充 HttpClient 記錄。

public:
generic <typename T>
 where T : class, Microsoft::Extensions::Http::Logging::IHttpClientLogEnricher[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddHttpClientLogEnricher(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClientLogEnricher<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.Extensions.Http.Logging.IHttpClientLogEnricher;
static member AddHttpClientLogEnricher : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Microsoft.Extensions.Http.Logging.IHttpClientLogEnricher)
<Extension()>
Public Function AddHttpClientLogEnricher(Of T As {Class, IHttpClientLogEnricher}) (services As IServiceCollection) As IServiceCollection

類型參數

T

擴充器的類型。

參數

services
IServiceCollection

IServiceCollection 加入 實體的 T

傳回

services 的值。

適用於