Language

CastSegmentTemplate Class

Definition

Represents a template that could match a type cast segment.

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

Constructors

Name Description
CastSegmentTemplate(IEdmType, IEdmType, IEdmNavigationSource)

Initializes a new instance of the CastSegmentTemplate class.

CastSegmentTemplate(TypeSegment)

Initializes a new instance of the CastSegmentTemplate class.

Properties

Name Description
CastType

Gets the cast type.

ExpectedType

Gets the expected type.

TypeSegment

Gets the expected type.

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