MediaType Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A media type value.
public value class MediaType
public struct MediaType
public readonly struct MediaType
type MediaType = struct
Public Structure MediaType
- Inheritance
-
MediaType
Constructors
MediaType(String, Int32, Nullable<Int32>) |
Initializes a Microsoft.AspNetCore.Mvc.Formatters.MediaType.MediaTypeParameterParser instance. |
MediaType(String) |
Initializes a MediaType instance. |
MediaType(StringSegment) |
Initializes a MediaType instance. |
Properties
Charset |
Gets the charset parameter of the MediaType if it has one. |
Encoding | |
HasWildcard |
Determines whether the current MediaType contains a wildcard. |
MatchesAllSubTypes |
Gets whether this MediaType matches all subtypes. |
MatchesAllSubTypesWithoutSuffix |
Gets whether this MediaType matches all subtypes, ignoring any structured syntax suffix. |
MatchesAllTypes |
Gets whether this MediaType matches all types. |
SubType |
Gets the subtype of the MediaType. |
SubTypeSuffix |
Gets the structured syntax suffix of the MediaType if it has one. |
SubTypeWithoutSuffix |
Gets the subtype of the MediaType, excluding any structured syntax suffix. |
Type |
Gets the type of the MediaType. |
Methods
CreateMediaTypeSegmentWithQuality(String, Int32) |
Creates an MediaTypeSegmentWithQuality containing the media type in |
GetEncoding(String) |
Get an encoding for a mediaType. |
GetEncoding(StringSegment) |
Get an encoding for a mediaType. |
GetParameter(String) |
Gets the parameter |
GetParameter(StringSegment) |
Gets the parameter |
IsSubsetOf(MediaType) |
Determines whether the current MediaType is a subset of the |
ReplaceEncoding(String, Encoding) |
Replaces the encoding of the given |
ReplaceEncoding(StringSegment, Encoding) |
Replaces the encoding of the given |