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,以便鏈結其他呼叫。