Table of Contents

Class DefaultODataPathHandler

Namespace
System.Web.Http.OData.Routing
Assembly
System.Web.Http.OData.dll

Parses an OData path as an ODataPath and converts an ODataPath into an OData link.

public class DefaultODataPathHandler : IODataPathHandler
Inheritance
DefaultODataPathHandler
Implements
Inherited Members

Constructors

DefaultODataPathHandler()

public DefaultODataPathHandler()

Methods

Converts an instance of ODataPath into an OData link.

public virtual string Link(ODataPath path)

Parameters

path ODataPath

The OData path to convert into a link.

Returns

string

The generated OData link.

Parse(IEdmModel, string)

Parses the specified OData path as an ODataPath that contains additional information about the EDM type and entity set for the path.

public virtual ODataPath Parse(IEdmModel model, string odataPath)

Parameters

model IEdmModel

The model to use for path parsing.

odataPath string

The OData path to parse.

Returns

ODataPath

A parsed representation of the path, or null if the path does not match the model.

ParseAtCollection(IEdmModel, ODataPathSegment, IEdmType, string)

Parses the next OData path segment following a collection.

protected virtual ODataPathSegment ParseAtCollection(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

previous ODataPathSegment

The previous path segment.

previousEdmType IEdmType

The EDM type of the OData path up to the previous segment.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseAtComplex(IEdmModel, ODataPathSegment, IEdmType, string)

Parses the next OData path segment following a complex-typed segment.

protected virtual ODataPathSegment ParseAtComplex(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

previous ODataPathSegment

The previous path segment.

previousEdmType IEdmType

The EDM type of the OData path up to the previous segment.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseAtEntity(IEdmModel, ODataPathSegment, IEdmType, string)

Parses the next OData path segment following an entity.

protected virtual ODataPathSegment ParseAtEntity(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

previous ODataPathSegment

The previous path segment.

previousEdmType IEdmType

The EDM type of the OData path up to the previous segment.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseAtEntityCollection(IEdmModel, ODataPathSegment, IEdmType, string)

Parses the next OData path segment following an entity collection.

protected virtual ODataPathSegment ParseAtEntityCollection(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

previous ODataPathSegment

The previous path segment.

previousEdmType IEdmType

The EDM type of the OData path up to the previous segment.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseAtPrimitiveProperty(IEdmModel, ODataPathSegment, IEdmType, string)

Parses the next OData path segment following a primitive property.

protected virtual ODataPathSegment ParseAtPrimitiveProperty(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

previous ODataPathSegment

The previous path segment.

previousEdmType IEdmType

The EDM type of the OData path up to the previous segment.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseEntrySegment(IEdmModel, string)

Parses the first OData segment following the service base URI.

protected virtual ODataPathSegment ParseEntrySegment(IEdmModel model, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseNextSegment(IEdmModel, ODataPathSegment, IEdmType, string)

Parses the next OData path segment.

protected virtual ODataPathSegment ParseNextSegment(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, string segment)

Parameters

model IEdmModel

The model to use for path parsing.

previous ODataPathSegment

The previous path segment.

previousEdmType IEdmType

The EDM type of the OData path up to the previous segment.

segment string

The value of the segment to parse.

Returns

ODataPathSegment

A parsed representation of the segment.

ParseSegments(string)

Parses the OData path into segments.

protected virtual IEnumerable<string> ParseSegments(string odataPath)

Parameters

odataPath string

The OData path.

Returns

IEnumerable<string>

The segments of the OData path.