Dela via


TemplatePart Class

Definition

Represents a part of a route template segment.

public ref class TemplatePart
public class TemplatePart
type TemplatePart = class
Public Class TemplatePart
Inheritance
TemplatePart

Constructors

TemplatePart()

Constructs a new TemplatePart instance.

TemplatePart(RoutePatternPart)

Constructs a new TemplatePart instance given a other.

Properties

DefaultValue

The default value for route parameters. Can be null.

InlineConstraints

The constraints associates with a route parameter.

IsCatchAll

true if the route part is is a catch-all part (e.g. /*).

IsLiteral

true if the route part is represents a literal value.

IsOptional

true if the route part represents an optional part.

IsOptionalSeperator

true if the route part represents an optional seperator.

IsParameter

true if the route part represents a parameterized value.

Name

The name of the route parameter. Can be null.

Text

The textual representation of the route parameter. Can be null. Used to represent route seperators and literal parts.

Methods

CreateLiteral(String)

Create a TemplatePart representing a literal route part.

CreateParameter(String, Boolean, Boolean, Object, IEnumerable<InlineConstraint>)

Creates a TemplatePart representing a parameter part.

ToRoutePatternPart()

Creates a RoutePatternPart for the route part designated by the TemplatePart.

Applies to