Class ODataSerializer
An ODataSerializer is used to write a CLR object to an ODataMessage.
public abstract class ODataSerializer
- Inheritance
-
ODataSerializer
- Derived
- Inherited Members
Constructors
ODataSerializer(ODataPayloadKind)
Constructs an ODataSerializer that can generate OData payload of the specified kind.
protected ODataSerializer(ODataPayloadKind payloadKind)
Parameters
payloadKind
ODataPayloadKindThe kind of OData payload that this serializer generates.
Properties
ODataPayloadKind
Gets the ODataPayloadKind that this serializer generates.
public ODataPayloadKind ODataPayloadKind { get; }
Property Value
- ODataPayloadKind
Methods
WriteObject(object, Type, ODataMessageWriter, ODataSerializerContext)
Writes the given object specified by the parameter graph as a whole using the given messageWriter and writeContext.
public virtual void WriteObject(object graph, Type type, ODataMessageWriter messageWriter, ODataSerializerContext writeContext)
Parameters
graph
objectThe object to be written
type
TypeThe type of the object to be written.
messageWriter
ODataMessageWriterThe Microsoft.Data.OData.ODataMessageWriter to be used for writing.
writeContext
ODataSerializerContext