MediaTypeHeaderValue.MatchesMediaType(StringSegment) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示是否 otherMediaType
是此 MediaTypeHeaderValue 类型/subType 的子集。 根据第 14.1 节“接受”中所述 https://www.ietf.org/rfc/rfc2068.txt 的优先级,将“子集”定义为相同或更具体的媒体类型。
public bool MatchesMediaType (Microsoft.Extensions.Primitives.StringSegment otherMediaType);
member this.MatchesMediaType : Microsoft.Extensions.Primitives.StringSegment -> bool
Public Function MatchesMediaType (otherMediaType As StringSegment) As Boolean
参数
- otherMediaType
- StringSegment
要比较的 StringSegment。
返回
一个 值,该值指示是否 otherMediaType
是此 MediaTypeHeaderValue的子集。
注解
例如,“multipart/mixed”是“multipart/mixed”、“multipart/*”和“*/*”的子集,但不是“multipart/message”。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈