Share via


ODataSerializer Class

An ODataSerializer is used to write a CLR object to an ODataMessage.

Inheritance Hierarchy

System.Object
  System.Web.Http.OData.Formatter.Serialization.ODataSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataEdmTypeSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataEntityReferenceLinkSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataEntityReferenceLinksSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataErrorSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataMetadataSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataRawValueSerializer
    System.Web.Http.OData.Formatter.Serialization.ODataWorkspaceSerializer

Namespace:  System.Web.Http.OData.Formatter.Serialization
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Syntax

'Declaration
Public MustInherit Class ODataSerializer
'Usage
Dim instance As ODataSerializer
public abstract class ODataSerializer
public ref class ODataSerializer abstract
[<AbstractClassAttribute>]
type ODataSerializer =  class end
public abstract class ODataSerializer

The ODataSerializer type exposes the following members.

Constructors

  Name Description
Protected method ODataSerializer Constructs an ODataSerializer that can generate OData payload of the specified kind.

Top

Properties

  Name Description
Public property ODataPayloadKind Gets the ODataPayloadKind that this serializer generates.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Public method WriteObject Writes the given object specified by the parameter graph as a whole using the given messageWriter and writeContext.

Top

Remarks

Each supported CLR type has a corresponding ODataSerializer. A CLR type is supported if it is one of the special types or if it has a backing EDM type. Some of the special types are Uri which maps to ODataReferenceLink payload, Uri[] which maps to ODataReferenceLinks payload, ODataWorkspace which maps to ODataServiceDocument payload.

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.Web.Http.OData.Formatter.Serialization Namespace