ProblemDetailsServiceCollectionExtensions.AddProblemDetails 方法

定义

重载

AddProblemDetails(IServiceCollection)

添加创建失败请求所需的 ProblemDetails 服务。

AddProblemDetails(IServiceCollection, Action<ProblemDetailsOptions>)

添加创建失败请求所需的 ProblemDetails 服务。

AddProblemDetails(IServiceCollection)

Source:
ProblemDetailsServiceCollectionExtensions.cs

添加创建失败请求所需的 ProblemDetails 服务。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddProblemDetails (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddProblemDetails : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddProblemDetails (services As IServiceCollection) As IServiceCollection

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

返回

IServiceCollection,以便可以链接其他调用。

适用于

AddProblemDetails(IServiceCollection, Action<ProblemDetailsOptions>)

Source:
ProblemDetailsServiceCollectionExtensions.cs

添加创建失败请求所需的 ProblemDetails 服务。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddProblemDetails (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Http.ProblemDetailsOptions>? configure);
static member AddProblemDetails : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Http.ProblemDetailsOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddProblemDetails (services As IServiceCollection, configure As Action(Of ProblemDetailsOptions)) As IServiceCollection

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

configure
Action<ProblemDetailsOptions>

ProblemDetailsOptions用于配置服务的 。

返回

IServiceCollection,以便可以链接其他调用。

适用于