RouteAttribute 類別

定義

放置控制器或動作以直接透過路由公開。 放置控制器時,會套用至沒有 System.Web.Mvc.RouteAttribute’s 的動作。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public sealed class RouteAttribute : Attribute, System.Web.Mvc.Routing.IDirectRouteFactory, System.Web.Mvc.Routing.IRouteInfoProvider
type RouteAttribute = class
    inherit Attribute
    interface IDirectRouteFactory
    interface IRouteInfoProvider
Public NotInheritable Class RouteAttribute
Inherits Attribute
Implements IDirectRouteFactory, IRouteInfoProvider
繼承
RouteAttribute
屬性
實作

建構函式

RouteAttribute()

初始化 RouteAttribute 類別的新執行個體。

RouteAttribute(String)

使用指定的範本, RouteAttribute 初始化 類別的新實例。

屬性

Name

取得或設定路徑的名稱。

Order

取得路由的套用順序。

Template

取得要符合之路由的模式。

明確介面實作

IDirectRouteFactory.CreateRoute(DirectRouteFactoryContext)

建立直接路由項目。

適用於