Table of Contents

Interface IDirectRouteBuilder

Namespace
System.Web.Mvc.Routing
Assembly
System.Web.Mvc.dll

Defines a builder that creates direct routes to actions (attribute routes).

public interface IDirectRouteBuilder

Properties

Actions

Gets the action descriptors to which to create a route.

IReadOnlyCollection<ActionDescriptor> Actions { get; }

Property Value

IReadOnlyCollection<ActionDescriptor>

The action descriptors to which to create a route.

Constraints

Gets or sets the route constraints.

RouteValueDictionary Constraints { get; set; }

Property Value

RouteValueDictionary

The route constraints.

DataTokens

Gets or sets the route data tokens.

RouteValueDictionary DataTokens { get; set; }

Property Value

RouteValueDictionary

The route data tokens.

Defaults

Gets or sets the route defaults.

RouteValueDictionary Defaults { get; set; }

Property Value

RouteValueDictionary

The route defaults.

Name

Gets or sets the route name.

string Name { get; set; }

Property Value

string

The route name, or null if no name supplied.

Order

Gets or sets the route order.

int Order { get; set; }

Property Value

int

The route order.

Precedence

Gets or sets the route precedence.

decimal Precedence { get; set; }

Property Value

decimal

The route precedence.

TargetIsAction

Gets a value indicating whether the route is configured at the action or controller level.

bool TargetIsAction { get; }

Property Value

bool

true when the route is configured at the action level; otherwise, false if the route is configured at the controller level.

Template

Gets or sets the route template.

string Template { get; set; }

Property Value

string

The route template.

Methods

Build()

Creates a route entry based on the current property values.

RouteEntry Build()

Returns

RouteEntry

The route entry created.