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
Public method MimeTypeAttribute Initializes a new instance of the MimeTypeAttribute class.

Top

Properties

  Name Description
Public property MemberName Gets the name of the attribute.
Public property MimeType Gets the MIME type of a request.
Public property TypeId (Inherited from Attribute.)

Top

Methods

  Name Description
Public method Equals (Inherited from Attribute.)
Public method GetHashCode (Inherited from Attribute.)
Public method GetType (Inherited from Object.)
Public method IsDefaultAttribute (Inherited from Attribute.)
Public method Match (Inherited from Attribute.)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method _Attribute.GetIDsOfNames (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfo (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfoCount (Inherited from Attribute.)
Explicit interface implemetationPrivate method _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.

See Also

Reference

System.Data.Services Namespace