Table of Contents

Class ODataEntityDeserializer

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

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 ODataDeserializerProvider

The deserializer provider to use to read inner objects.

Methods

Deserializes the navigation properties from entryWrapper into entityResource.

public virtual void ApplyNavigationProperties(object entityResource, ODataEntryWithNavigationLinks entryWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)

Parameters

entityResource object

The object into which the navigation properties should be read.

entryWrapper ODataEntryWithNavigationLinks

The entry object containing the navigation properties.

entityType IEdmEntityTypeReference

The entity type of the entity resource.

readContext ODataDeserializerContext

The 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 object

The object into which the navigation property should be read.

navigationLinkWrapper ODataNavigationLinkWithItems

The navigation link.

entityType IEdmEntityTypeReference

The entity type of the entity resource.

readContext ODataDeserializerContext

The deserializer context.

Deserializes the structural properties from entryWrapper into entityResource.

public virtual void ApplyStructuralProperties(object entityResource, ODataEntryWithNavigationLinks entryWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)

Parameters

entityResource object

The object into which the structural properties should be read.

entryWrapper ODataEntryWithNavigationLinks

The entry object containing the structural properties.

entityType IEdmEntityTypeReference

The entity type of the entity resource.

readContext ODataDeserializerContext

The 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 object

The object into which the structural property should be read.

structuralProperty ODataProperty

The entry object containing the structural properties.

entityType IEdmEntityTypeReference

The entity type of the entity resource.

readContext ODataDeserializerContext

The 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 IEdmEntityTypeReference

The EDM type of the entity to create.

readContext ODataDeserializerContext

The deserializer context.

Returns

object

The created CLR object.

Read(ODataMessageReader, Type, ODataDeserializerContext)

public override object Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)

Parameters

messageReader ODataMessageReader
type Type
readContext ODataDeserializerContext

Returns

object

Deserializes the given entryWrapper under the given readContext.

public virtual object ReadEntry(ODataEntryWithNavigationLinks entryWrapper, IEdmEntityTypeReference entityType, ODataDeserializerContext readContext)

Parameters

entryWrapper ODataEntryWithNavigationLinks

The OData entry to deserialize.

entityType IEdmEntityTypeReference

The entity type of the entry to deserialize.

readContext ODataDeserializerContext

The 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 ODataReader

The 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 object
edmType IEdmTypeReference
readContext ODataDeserializerContext

Returns

object