MimeTypeAttribute Class
Indicates the MIME type of HTTP request.
Inheritance Hierarchy
System.Object
System.Attribute
System.Data.Services.MimeTypeAttribute
Namespace: System.Data.Services
Assembly: Microsoft.Data.Services (in Microsoft.Data.Services.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := True)> _
Public NotInheritable Class MimeTypeAttribute _
Inherits Attribute
'Usage
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
The MimeTypeAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MimeTypeAttribute | Initializes a new instance of the MimeTypeAttribute class. |
Top
Properties
Name | Description | |
---|---|---|
MemberName | Gets the name of the attribute. | |
MimeType | Gets the MIME type of a request. | |
TypeId | (Inherited from Attribute.) |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Attribute.) | |
GetHashCode | (Inherited from Attribute.) | |
GetType | (Inherited from Object.) | |
IsDefaultAttribute | (Inherited from Attribute.) | |
Match | (Inherited from Attribute.) | |
ToString | (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
_Attribute.GetIDsOfNames | (Inherited from Attribute.) | |
_Attribute.GetTypeInfo | (Inherited from Attribute.) | |
_Attribute.GetTypeInfoCount | (Inherited from Attribute.) | |
_Attribute.Invoke | (Inherited from Attribute.) |
Top
Remarks
The mechanism used to control the serialization format used for a request sent from a client to a data service is the Content-Type HTTP header. The default mechanism controlling the format used in a response from a data service is the Accept HTTP header. The Accept header is used to indicate that the response to the request is limited to a specific set of MIME types. The MIME type returned from parsing the accept header is then used as the response format.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.