MimeTypeAttribute 類別
表示 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) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。