Table of Contents

Class ODataEdmTypeSerializer

Namespace
System.Web.Http.OData.Formatter.Serialization
Assembly
System.Web.Http.OData.dll

Represents an ODataSerializer that serializes instances of objects backed by an Microsoft.Data.Edm.IEdmType.

public abstract class ODataEdmTypeSerializer : ODataSerializer
Inheritance
ODataEdmTypeSerializer
Derived
Inherited Members

Constructors

ODataEdmTypeSerializer(ODataPayloadKind)

Initializes a new instance of the ODataEdmTypeSerializer class.

protected ODataEdmTypeSerializer(ODataPayloadKind payloadKind)

Parameters

payloadKind ODataPayloadKind

The kind of OData payload that this serializer generates.

ODataEdmTypeSerializer(ODataPayloadKind, ODataSerializerProvider)

Initializes a new instance of the ODataEdmTypeSerializer class.

protected ODataEdmTypeSerializer(ODataPayloadKind payloadKind, ODataSerializerProvider serializerProvider)

Parameters

payloadKind ODataPayloadKind

The kind of OData payload that this serializer generates.

serializerProvider ODataSerializerProvider

The ODataSerializerProvider to use to write inner objects.

Properties

SerializerProvider

Gets the ODataSerializerProvider that can be used to write inner objects.

public ODataSerializerProvider SerializerProvider { get; }

Property Value

ODataSerializerProvider

Methods

CreateODataValue(object, IEdmTypeReference, ODataSerializerContext)

Creates an Microsoft.Data.OData.ODataValue for the object represented by graph.

public virtual ODataValue CreateODataValue(object graph, IEdmTypeReference expectedType, ODataSerializerContext writeContext)

Parameters

graph object

The value of the Microsoft.Data.OData.ODataValue to be created.

expectedType IEdmTypeReference

The expected EDM type of the object represented by graph.

writeContext ODataSerializerContext

The ODataSerializerContext.

Returns

ODataValue

The Microsoft.Data.OData.ODataValue created.

WriteObjectInline(object, IEdmTypeReference, ODataWriter, ODataSerializerContext)

Writes the given object specified by the parameter graph as a part of an existing OData message using the given messageWriter and the writeContext.

public virtual void WriteObjectInline(object graph, IEdmTypeReference expectedType, ODataWriter writer, ODataSerializerContext writeContext)

Parameters

graph object

The object to be written.

expectedType IEdmTypeReference

The expected EDM type of the object represented by graph.

writer ODataWriter

The Microsoft.Data.OData.ODataWriter to be used for writing.

writeContext ODataSerializerContext

The ODataSerializerContext.