Share via


ODataSerializer Class

 

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

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

Inheritance Hierarchy

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

Syntax

public abstract class ODataSerializer
public ref class ODataSerializer abstract 
[<AbstractClass>]
type ODataSerializer = class end
Public MustInherit Class ODataSerializer

Constructors

Name Description
System_CAPS_protmethod ODataSerializer(ODataPayloadKind)

Constructs an ODataSerializer that can generate OData payload of the specified kind.

Properties

Name Description
System_CAPS_pubproperty ODataPayloadKind

Gets the ODataPayloadKind that this serializer generates.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod WriteObject(Object, Type, ODataMessageWriter, ODataSerializerContext)

Writes the given object specified by the parameter graph as a whole using the given messageWriter and writeContext.

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

System.Web.OData.Formatter.Serialization Namespace

Return to top