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 | |
---|---|---|
ODataSerializer | Constructs an ODataSerializer that can generate OData payload of the specified kind. |
Top
Properties
Name | Description | |
---|---|---|
ODataPayloadKind | Gets the ODataPayloadKind that this serializer generates. |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) | |
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.