C# 클래스 DotNetify.Routing.RoutableExtension

파일 보기 프로젝트 열기: dsuryd/dotNetify 1 사용 예제들

공개 메소드들

메소드 설명
GetRoute ( this routable, string templateId, string path = null ) : DotNetify.Routing.Route

Defines a route from a route template that belongs to the view model.

InitArgs ( this routable, object viewData ) : string

Returns HTML data attribute markup that contains routing initialization arguments. This needs to be placed in the same DOM element that has the "data-vm" attribute.

OnActivated ( this iRoutable, EventHandler eventHandler ) : void

Handles the activate event, which occurs when a route is being activated.

OnRouted ( this routable, EventHandler eventHandler ) : void

Handles the routed event, which occurs when this view model is being routed to.

Redirect ( this routable, string redirectRoot, string path ) : DotNetify.Routing.Route

Defines a route that belongs to another view model.

RegisterRoutes ( this routable, string root, List routeTemplates ) : void

Registers route templates.

Route ( RoutingViewData &viewData, IRoutable &oModel ) : string

Call this method from the controller to perform routing.

RouteUrl ( this routable, RoutingViewData &viewData ) : void

Performs routing. The URL path is given inside the view data, along with the initial route template to start from. This is a recursive method that will be called again by the nested views until the route is resolved.

비공개 메소드들

메소드 설명
Match ( string urlPath, string root, string urlPattern, string &oPath ) : bool

Matches the URL path with the given URL pattern.

MatchTemplate ( List templates, string urlPath, string rootPath ) : string>?.KeyValuePair

Matches a URL path to any of the route templates.

메소드 상세

GetRoute() 공개 정적인 메소드

Defines a route from a route template that belongs to the view model.
public static GetRoute ( this routable, string templateId, string path = null ) : DotNetify.Routing.Route
routable this Routable view model.
templateId string Identifies a template that belongs to this view model.
path string Optional path, to be used to replace parameterized template's URL pattern.
리턴 DotNetify.Routing.Route

InitArgs() 공개 정적인 메소드

Returns HTML data attribute markup that contains routing initialization arguments. This needs to be placed in the same DOM element that has the "data-vm" attribute.
public static InitArgs ( this routable, object viewData ) : string
routable this Routable view model.
viewData object Routing view data.
리턴 string

OnActivated() 공개 정적인 메소드

Handles the activate event, which occurs when a route is being activated.
public static OnActivated ( this iRoutable, EventHandler eventHandler ) : void
iRoutable this Routable view model.
eventHandler EventHandler Activate event handler.
리턴 void

OnRouted() 공개 정적인 메소드

Handles the routed event, which occurs when this view model is being routed to.
public static OnRouted ( this routable, EventHandler eventHandler ) : void
routable this Routable view model.
eventHandler EventHandler Routed event handler.
리턴 void

Redirect() 공개 정적인 메소드

Defines a route that belongs to another view model.
public static Redirect ( this routable, string redirectRoot, string path ) : DotNetify.Routing.Route
routable this Routable view model.
redirectRoot string Root path of the route. If the path partially matches the view model's root path, they will be combined.
path string Route path.
리턴 DotNetify.Routing.Route

RegisterRoutes() 공개 정적인 메소드

Registers route templates.
public static RegisterRoutes ( this routable, string root, List routeTemplates ) : void
routable this Routable view model.
root string Root path to which all other paths will be evaluated.
routeTemplates List Route templates that belong to the view model.
리턴 void

Route() 공개 정적인 메소드

Call this method from the controller to perform routing.
public static Route ( RoutingViewData &viewData, IRoutable &oModel ) : string
viewData RoutingViewData Routing view data.
oModel IRoutable Model to be passed to the view.
리턴 string

RouteUrl() 공개 정적인 메소드

Performs routing. The URL path is given inside the view data, along with the initial route template to start from. This is a recursive method that will be called again by the nested views until the route is resolved.
public static RouteUrl ( this routable, RoutingViewData &viewData ) : void
routable this Routable view model.
viewData RoutingViewData Routing view data.
리턴 void