protected Route(IRouteStack routes, IRouteFactory routeFactory) { this.RouteConfig = new RouteConfig(); this.Routes = routes; this.RouteFactory = routeFactory; this.PushMenuRouteCommand = this.AsyncCommand <Type>(this.PushMenuRoute); this.GoToMenuRouteCommand = this.AsyncCommand <Type>(this.GoToMenuRoute); this.PopRouteCommand = this.AsyncCommand <object>(this.PopRoute, false); }
protected Route(IRouteStack routes, IRouteFactory routeFactory) { RouteConfig = new RouteConfig(); Routes = routes; RouteFactory = routeFactory; PushMenuRouteCommand = AsyncCommand <Type>(PushMenuRoute); GoToMenuRouteCommand = AsyncCommand <Type>(GoToMenuRoute); PopRouteCommand = AsyncCommand <object>(PopRoute, false); }
protected Route(IRouteStack routes) : this(routes, null) { }
public static TRoute FindMenuRoute <TRoute>(this IRouteStack routeStack, Func <TRoute, bool> filter) where TRoute : Route => (TRoute)routeStack.MenuRoutes.First(route => { var tRoute = route as TRoute; return(tRoute != null && filter(tRoute)); });
public static TRoute FindMenuRoute <TRoute>(this IRouteStack routeStack) where TRoute : Route => (TRoute)routeStack.MenuRoutes.First(route => route is TRoute);
public static Route FindMenuRoute(this IRouteStack routeStack, Func <Route, bool> filter) => routeStack.MenuRoutes.First(route => route != null && filter(route));