FormatterMappings.SetMediaTypeMappingForFormat 方法

定义

重载

SetMediaTypeMappingForFormat(String, MediaTypeHeaderValue)

将格式的映射设置为指定的媒体类型。 如果格式已存在,则将用新值覆盖媒体类型。

SetMediaTypeMappingForFormat(String, String)

将格式的映射设置为指定的媒体类型。 如果格式已存在,则将用新值覆盖媒体类型。

SetMediaTypeMappingForFormat(String, MediaTypeHeaderValue)

Source:
FormatterMappings.cs
Source:
FormatterMappings.cs

将格式的映射设置为指定的媒体类型。 如果格式已存在,则将用新值覆盖媒体类型。

public:
 void SetMediaTypeMappingForFormat(System::String ^ format, Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ contentType);
public void SetMediaTypeMappingForFormat (string format, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType);
member this.SetMediaTypeMappingForFormat : string * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> unit
Public Sub SetMediaTypeMappingForFormat (format As String, contentType As MediaTypeHeaderValue)

参数

format
String

格式值。

contentType
MediaTypeHeaderValue

格式值的媒体类型。

适用于

SetMediaTypeMappingForFormat(String, String)

Source:
FormatterMappings.cs
Source:
FormatterMappings.cs

将格式的映射设置为指定的媒体类型。 如果格式已存在,则将用新值覆盖媒体类型。

public:
 void SetMediaTypeMappingForFormat(System::String ^ format, System::String ^ contentType);
public void SetMediaTypeMappingForFormat (string format, string contentType);
member this.SetMediaTypeMappingForFormat : string * string -> unit
Public Sub SetMediaTypeMappingForFormat (format As String, contentType As String)

参数

format
String

格式值。

contentType
String

格式值的媒体类型。

适用于