MediaTypeHeaderValue.MatchesMediaType(StringSegment) Method
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.
Gets a value indicating whether otherMediaType
is a subset of
this MediaTypeHeaderValue in terms of type/subType. A "subset" is defined as the same or a more specific media type
according to the precedence described in https://www.ietf.org/rfc/rfc2068.txt section 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
Parameters
- otherMediaType
- StringSegment
The StringSegment to compare.
Returns
A value indicating whether otherMediaType
is a subset of
this MediaTypeHeaderValue.
Remarks
For example "multipart/mixed" is a subset of "multipart/mixed", "multipart/*", and "*/*" but not "multipart/message."
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for