ApiConventionApplicationModelConvention 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 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 。