共用方式為


ApiConventionApplicationModelConvention 建構函式

定義

初始化 ApiConventionApplicationModelConvention 的新執行個體。

public:
 ApiConventionApplicationModelConvention(Microsoft::AspNetCore::Mvc::ProducesErrorResponseTypeAttribute ^ defaultErrorResponseType);
public ApiConventionApplicationModelConvention (Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute defaultErrorResponseType);
new Microsoft.AspNetCore.Mvc.ApplicationModels.ApiConventionApplicationModelConvention : Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute -> Microsoft.AspNetCore.Mvc.ApplicationModels.ApiConventionApplicationModelConvention
Public Sub New (defaultErrorResponseType As ProducesErrorResponseTypeAttribute)

參數

defaultErrorResponseType
ProducesErrorResponseTypeAttribute

要使用的錯誤類型。 如果未推斷預設錯誤類型,請使用 Void

適用於