共用方式為


ProducesDefaultResponseTypeAttribute.IApiResponseMetadataProvider.SetContentTypes 方法

定義

設定允許的內容類型集合,這些內容類型可由動作產生。

 virtual void Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider.SetContentTypes(Microsoft::AspNetCore::Mvc::Formatters::MediaTypeCollection ^ contentTypes) = Microsoft::AspNetCore::Mvc::ApiExplorer::IApiResponseMetadataProvider::SetContentTypes;
void IApiResponseMetadataProvider.SetContentTypes (Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes);
abstract member Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider.SetContentTypes : Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection -> unit
override this.Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider.SetContentTypes : Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection -> unit
Sub SetContentTypes (contentTypes As MediaTypeCollection) Implements IApiResponseMetadataProvider.SetContentTypes

參數

contentTypes
MediaTypeCollection

實作

適用於