Class ODataEntityDeserializer
Represents an ODataDeserializer for reading OData entry payloads.
public class ODataEntityDeserializer : ODataEdmTypeDeserializer
- Inheritance
-
ODataEntityDeserializer
- Inherited Members
Constructors
ODataEntityDeserializer(ODataDeserializerProvider)
Initializes a new instance of the ODataEntityDeserializer class.
public ODataEntityDeserializer(ODataDeserializerProvider deserializerProvider)
Parameters
deserializerProvider
ODataDeserializerProviderThe deserializer provider to use to read inner objects.
Methods
ApplyNavigationProperties(object, ODataEntryWithNavigationLinks, IEdmEntityTypeReference, ODataDeserializerContext)
Deserializes the navigation properties from entryWrapper
into entityResource
.
public virtual void ApplyNavigationProperties(object entityResource, ODataEntryWithNavigationLinks entryWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)
Parameters
entityResource
objectThe object into which the navigation properties should be read.
entryWrapper
ODataEntryWithNavigationLinksThe entry object containing the navigation properties.
entityType
IEdmEntityTypeReferenceThe entity type of the entity resource.
readContext
ODataDeserializerContextThe deserializer context.
ApplyNavigationProperty(object, ODataNavigationLinkWithItems, IEdmEntityTypeReference, ODataDeserializerContext)
Deserializes the navigation property from navigationLinkWrapper
into entityResource
.
public virtual void ApplyNavigationProperty(object entityResource, ODataNavigationLinkWithItems navigationLinkWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)
Parameters
entityResource
objectThe object into which the navigation property should be read.
navigationLinkWrapper
ODataNavigationLinkWithItemsThe navigation link.
entityType
IEdmEntityTypeReferenceThe entity type of the entity resource.
readContext
ODataDeserializerContextThe deserializer context.
ApplyStructuralProperties(object, ODataEntryWithNavigationLinks, IEdmEntityTypeReference, ODataDeserializerContext)
Deserializes the structural properties from entryWrapper
into entityResource
.
public virtual void ApplyStructuralProperties(object entityResource, ODataEntryWithNavigationLinks entryWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)
Parameters
entityResource
objectThe object into which the structural properties should be read.
entryWrapper
ODataEntryWithNavigationLinksThe entry object containing the structural properties.
entityType
IEdmEntityTypeReferenceThe entity type of the entity resource.
readContext
ODataDeserializerContextThe deserializer context.
ApplyStructuralProperty(object, ODataProperty, IEdmEntityTypeReference, ODataDeserializerContext)
Deserializes the given structuralProperty
into entityResource
.
public virtual void ApplyStructuralProperty(object entityResource, ODataProperty structuralProperty, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)
Parameters
entityResource
objectThe object into which the structural property should be read.
structuralProperty
ODataPropertyThe entry object containing the structural properties.
entityType
IEdmEntityTypeReferenceThe entity type of the entity resource.
readContext
ODataDeserializerContextThe deserializer context.
CreateEntityResource(IEdmEntityTypeReference, ODataDeserializerContext)
Creates a new instance of the backing CLR object for the given entity type.
public virtual object CreateEntityResource(IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)
Parameters
entityType
IEdmEntityTypeReferenceThe EDM type of the entity to create.
readContext
ODataDeserializerContextThe deserializer context.
Returns
- object
The created CLR object.
Read(ODataMessageReader, Type, ODataDeserializerContext)
public override object Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)
Parameters
messageReader
ODataMessageReadertype
TypereadContext
ODataDeserializerContext
Returns
ReadEntry(ODataEntryWithNavigationLinks, IEdmEntityTypeReference, ODataDeserializerContext)
Deserializes the given entryWrapper
under the given readContext
.
public virtual object ReadEntry(ODataEntryWithNavigationLinks entryWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)
Parameters
entryWrapper
ODataEntryWithNavigationLinksThe OData entry to deserialize.
entityType
IEdmEntityTypeReferenceThe entity type of the entry to deserialize.
readContext
ODataDeserializerContextThe deserializer context.
Returns
- object
The deserialized entity.
ReadEntryOrFeed(ODataReader)
Reads an ODataFeed or an ODataItem from the reader.
public static ODataItemBase ReadEntryOrFeed(ODataReader reader)
Parameters
reader
ODataReaderThe OData reader to read from.
Returns
- ODataItemBase
The read feed or entry.
ReadInline(object, IEdmTypeReference, ODataDeserializerContext)
public override sealed object ReadInline(object item, IEdmTypeReference edmType, ODataDeserializerContext readContext)
Parameters
item
objectedmType
IEdmTypeReferencereadContext
ODataDeserializerContext