MediaType Struktura

Definicja

Wartość typu nośnika.

public value class MediaType
public struct MediaType
public readonly struct MediaType
type MediaType = struct
Public Structure MediaType
Dziedziczenie
MediaType

Konstruktory

MediaType(String)

Inicjuje MediaType wystąpienie.

MediaType(String, Int32, Nullable<Int32>)

Inicjuje Microsoft.AspNetCore.Mvc.Formatters.MediaType.MediaTypeParameterParser wystąpienie.

MediaType(StringSegment)

Inicjuje MediaType wystąpienie.

Właściwości

Charset

Pobiera parametr charset parametru MediaType , jeśli ma jeden.

Encoding

Pobiera wartość Encoding , MediaType jeśli ma wartość .

HasWildcard

Określa, czy bieżący MediaType zawiera symbol wieloznaczny.

MatchesAllSubTypes

Pobiera informacje o tym, czy jest to MediaType zgodne ze wszystkimi podtypami.

MatchesAllSubTypesWithoutSuffix

Pobiera informacje o tym, czy jest to MediaType zgodne ze wszystkimi podtypami, ignorując wszelkie sufiksy składni ustrukturyzowanej.

MatchesAllTypes

Pobiera informacje o tym, czy jest to MediaType zgodne ze wszystkimi typami.

SubType

Pobiera podtyp elementu MediaType.

SubTypeSuffix

Pobiera sufiks składni ustrukturyzowanej , MediaType jeśli ma taki sufiks.

SubTypeWithoutSuffix

Pobiera podtyp MediaTypeobiektu , z wyłączeniem dowolnego sufiksu składni strukturalnej.

Type

Pobiera typ .MediaType

Metody

CreateMediaTypeSegmentWithQuality(String, Int32)

Tworzy obiekt MediaTypeSegmentWithQuality zawierający typ nośnika i mediaType skojarzona z nim jakość.

GetEncoding(String)

Pobierz kodowanie dla elementu mediaType.

GetEncoding(StringSegment)

Pobierz kodowanie dla elementu mediaType.

GetParameter(String)

Pobiera parametr parameterName typu nośnika.

GetParameter(StringSegment)

Pobiera parametr parameterName typu nośnika.

IsSubsetOf(MediaType)

Określa, czy bieżący MediaType jest podzbiorem elementu setMediaType.

ReplaceEncoding(String, Encoding)

Zamienia kodowanie podanego mediaType elementu na podany encodingelement .

ReplaceEncoding(StringSegment, Encoding)

Zamienia kodowanie podanego mediaType elementu na podany encodingelement .

Dotyczy