Table of Contents

Class RouteAttribute

Namespace
System.Web.Http
Assembly
System.Web.Http.dll

Place on an action to expose it directly via a route.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
public sealed class RouteAttribute : Attribute, IDirectRouteFactory, IHttpRouteInfoProvider
Inheritance
RouteAttribute
Implements
Inherited Members

Constructors

RouteAttribute()

Initializes a new instance of the RouteAttribute class.

public RouteAttribute()

RouteAttribute(string)

Initializes a new instance of the RouteAttribute class.

public RouteAttribute(string template)

Parameters

template string

The route template describing the URI pattern to match against.

Properties

Name

public string Name { get; set; }

Property Value

string

Returns string.

Order

public int Order { get; set; }

Property Value

int

Returns int.

Template

public string Template { get; }

Property Value

string

Returns string.