指示 HTTP 请求的 MIME 类型。
继承层次结构
System.Object
System.Attribute
System.Data.Services.MimeTypeAttribute
命名空间: System.Data.Services
程序集: Microsoft.Data.Services(在 Microsoft.Data.Services.dll 中)
语法
声明
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := True)> _
Public NotInheritable Class MimeTypeAttribute _
Inherits Attribute
用法
Dim instance As MimeTypeAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class MimeTypeAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false, Inherited = true)]
public ref class MimeTypeAttribute sealed : public Attribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)>]
type MimeTypeAttribute =
class
inherit Attribute
end
public final class MimeTypeAttribute extends Attribute
MimeTypeAttribute 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
![]() |
MimeTypeAttribute | 初始化 MimeTypeAttribute 类的新实例。 |
页首
属性
名称 | 说明 | |
---|---|---|
![]() |
MemberName | 获取属性的名称。 |
![]() |
MimeType | 获取请求的 MIME 类型。 |
![]() |
TypeId | (从 Attribute 继承。) |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
Equals | (从 Attribute 继承。) |
![]() |
Finalize | (从 Object 继承。) |
![]() |
GetHashCode | (从 Attribute 继承。) |
![]() |
GetType | (从 Object 继承。) |
![]() |
IsDefaultAttribute | (从 Attribute 继承。) |
![]() |
Match | (从 Attribute 继承。) |
![]() |
MemberwiseClone | (从 Object 继承。) |
![]() |
ToString | (从 Object 继承。) |
页首
显式接口实现
名称 | 说明 | |
---|---|---|
![]() ![]() |
_Attribute.GetIDsOfNames | (从 Attribute 继承。) |
![]() ![]() |
_Attribute.GetTypeInfo | (从 Attribute 继承。) |
![]() ![]() |
_Attribute.GetTypeInfoCount | (从 Attribute 继承。) |
![]() ![]() |
_Attribute.Invoke | (从 Attribute 继承。) |
页首
注释
用于控制从客户端向数据服务发送的请求所使用的序列化格式的机制是 Content-Type HTTP 标头。 控制在来自数据服务的响应中所使用的格式的默认机制是 Accept HTTP 标头。 Accept 标头用于指示对请求的响应仅限于特定 MIME 类型集。 然后,从分析接受标头返回的 MIME 类型用作响应格式。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。