Language

PathTemplateSegmentTemplate Class

Definition

Represents a template that can match a PathTemplateSegment. From OData Lib: If template parseing enabled, any literal wrappered with "{" and "}" is considered as PathTemplateSegment. So, here's the design (so far, we can add more later): {property} ==> declared property {dynamicproperty} => dynamic property TODO: we can change to use route constraint, for example: {name:odataproperty} {name:odatadynamic} {name:odatacast} {name:odataentityset} ...

public class PathTemplateSegmentTemplate : Microsoft.AspNetCore.OData.Routing.Template.ODataSegmentTemplate
type PathTemplateSegmentTemplate = class
    inherit ODataSegmentTemplate
Public Class PathTemplateSegmentTemplate
Inherits ODataSegmentTemplate
Inheritance
PathTemplateSegmentTemplate

Constructors

Name Description
PathTemplateSegmentTemplate(PathTemplateSegment)

Initializes a new instance of the PathTemplateSegmentTemplate class.

Properties

Name Description
ParameterName

Gets the segment name

Segment

The parameter name of the dynamic property.

Methods

Name Description
GetTemplates(ODataRouteOptions)

Gets the templates. It's case-insensitive template. It's used to build the routing template in conventional routing. It's not used in attribute routing. The template string should include the leading "/" if apply.

TryTranslate(ODataTemplateTranslateContext)

Translate the template into a real OData path segment ODataPathSegment

Applies to