Class ODataEdmTypeSerializer
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
ODataPayloadKindThe 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
ODataPayloadKindThe kind of OData payload that this serializer generates.
serializerProvider
ODataSerializerProviderThe 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
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
objectThe value of the Microsoft.Data.OData.ODataValue to be created.
expectedType
IEdmTypeReferenceThe expected EDM type of the object represented by
graph
.writeContext
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
objectThe object to be written.
expectedType
IEdmTypeReferenceThe expected EDM type of the object represented by
graph
.writer
ODataWriterThe Microsoft.Data.OData.ODataWriter to be used for writing.
writeContext
ODataSerializerContext