ProblemDetailsServiceCollectionExtensions.AddProblemDetails 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddProblemDetails(IServiceCollection) |
添加创建失败请求所需的 ProblemDetails 服务。 |
AddProblemDetails(IServiceCollection, Action<ProblemDetailsOptions>) |
添加创建失败请求所需的 ProblemDetails 服务。 |
AddProblemDetails(IServiceCollection)
添加创建失败请求所需的 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>)
添加创建失败请求所需的 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,以便可以链接其他调用。