HttpClientLoggingServiceCollectionExtensions.AddHttpClientLogEnricher<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將的 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
的值。