Class RouteFactoryAttribute
Represents an attribute route that may contain custom constraints.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
public abstract class RouteFactoryAttribute : Attribute, IDirectRouteFactory
- Inheritance
-
RouteFactoryAttribute
- Implements
- Inherited Members
Constructors
RouteFactoryAttribute(string)
Initializes a new instance of the RouteFactoryAttribute class.
protected RouteFactoryAttribute(string template)
Parameters
template
stringThe route template.
Properties
Constraints
Gets the route constraints, if any; otherwise null.
public virtual IDictionary<string, object> Constraints { get; }
Property Value
- IDictionary<string, object>
The route constraints, if any; otherwise null.
DataTokens
Gets the route data tokens, if any; otherwise null.
public virtual IDictionary<string, object> DataTokens { get; }
Property Value
- IDictionary<string, object>
The route data tokens, if any; otherwise null.
Defaults
Gets the route defaults, if any; otherwise null.
public virtual IDictionary<string, object> Defaults { get; }
Property Value
- IDictionary<string, object>
The route defaults, if any; otherwise null.
Name
Gets or sets the route name, if any; otherwise null.
public string Name { get; set; }
Property Value
- string
The route name, if any; otherwise null.
Order
Gets or sets the route order.
public int Order { get; set; }
Property Value
- int
The route order.
Template
Gets the route template.
public string Template { get; }
Property Value
- string
The route template.
Methods
CreateRoute(DirectRouteFactoryContext)
Creates the route entry
public RouteEntry CreateRoute(DirectRouteFactoryContext context)
Parameters
context
DirectRouteFactoryContextThe context.
Returns
- RouteEntry
The created route entry.