Share via


MediaTypeHeaderValue.MatchesMediaType(StringSegment) Metodo

Definizione

Ottiene un valore che indica se otherMediaType è un subset di questo MediaTypeHeaderValue oggetto in termini di tipo/sottoTipo. Un "subset" viene definito come lo stesso o un tipo di supporto più specifico in base alla precedenza descritta nella https://www.ietf.org/rfc/rfc2068.txt sezione 14.1, Accept.

public bool MatchesMediaType (Microsoft.Extensions.Primitives.StringSegment otherMediaType);
member this.MatchesMediaType : Microsoft.Extensions.Primitives.StringSegment -> bool
Public Function MatchesMediaType (otherMediaType As StringSegment) As Boolean

Parametri

otherMediaType
StringSegment

Oggetto StringSegment da confrontare.

Restituisce

Valore che indica se otherMediaType è un subset di questo MediaTypeHeaderValueoggetto .

Commenti

Ad esempio, "multipart/mixed" è un subset di "multipart/mixed", "multipart/*" e "*/*", ma non "multipart/message".

Si applica a