Table of Contents

Class ODataSerializerContext

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

Context information used by the ODataSerializer when serializing objects in OData message format.

public class ODataSerializerContext
Inheritance
ODataSerializerContext
Inherited Members

Constructors

ODataSerializerContext()

Initializes a new instance of the ODataSerializerContext class.

public ODataSerializerContext()

ODataSerializerContext(EntityInstanceContext, SelectExpandClause, IEdmNavigationProperty)

Initializes a new instance of the ODataSerializerContext class.

public ODataSerializerContext(EntityInstanceContext entity, SelectExpandClause selectExpandClause, IEdmNavigationProperty navigationProperty)

Parameters

entity EntityInstanceContext

The entity whose navigation property is being expanded.

selectExpandClause SelectExpandClause

The SelectExpandClause for the navigation property being expanded.

navigationProperty IEdmNavigationProperty

The navigation property being expanded.

Properties

EntitySet

Gets or sets the entity set.

public IEdmEntitySet EntitySet { get; set; }

Property Value

IEdmEntitySet

ExpandedEntity

Gets or sets the entity that is being expanded.

public EntityInstanceContext ExpandedEntity { get; set; }

Property Value

EntityInstanceContext

Items

Gets a property bag associated with this context to store any generic data.

public IDictionary<object, object> Items { get; }

Property Value

IDictionary<object, object>

MetadataLevel

Gets or sets the metadata level of the response.

public ODataMetadataLevel MetadataLevel { get; set; }

Property Value

ODataMetadataLevel

Model

Gets or sets the EDM model associated with the request.

public IEdmModel Model { get; set; }

Property Value

IEdmModel

NavigationProperty

Gets or sets the navigation property being expanded.

public IEdmNavigationProperty NavigationProperty { get; set; }

Property Value

IEdmNavigationProperty

Path

Gets or sets the ODataPath of the request.

public ODataPath Path { get; set; }

Property Value

ODataPath

Request

Gets or sets the HTTP Request whose response is being serialized.

public HttpRequestMessage Request { get; set; }

Property Value

HttpRequestMessage

RequestContext

Gets or sets the request context.

public HttpRequestContext RequestContext { get; set; }

Property Value

HttpRequestContext

RootElementName

Gets or sets the root element name which is used when writing primitive types and complex types.

public string RootElementName { get; set; }

Property Value

string

SelectExpandClause

Gets or sets the SelectExpandClause.

public SelectExpandClause SelectExpandClause { get; set; }

Property Value

SelectExpandClause

SkipExpensiveAvailabilityChecks

Get or sets whether expensive links should be calculated.

public bool SkipExpensiveAvailabilityChecks { get; set; }

Property Value

bool

Url

Gets or sets the System.Web.Http.Routing.UrlHelper to use for generating OData links.

public UrlHelper Url { get; set; }

Property Value

UrlHelper