HttpLoggingServicesExtensions.AddHttpLoggingInterceptor<T> 方法

定义

将给定类型注册为 IHttpLoggingInterceptor DI 容器中的 。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpLoggingInterceptor<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.AspNetCore.HttpLogging.IHttpLoggingInterceptor;
static member AddHttpLoggingInterceptor : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Microsoft.AspNetCore.HttpLogging.IHttpLoggingInterceptor)
<Extension()>
Public Function AddHttpLoggingInterceptor(Of T As {Class, IHttpLoggingInterceptor}) (services As IServiceCollection) As IServiceCollection

类型参数

T

实现 的类型 IHttpLoggingInterceptor

参数

services
IServiceCollection

服务集合。

返回

用于链接的原始服务集合。

适用于