Extension methods for INavigatable.
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public static class NavigatableExtensions
Inheritance: objectNavigatableExtensions
Inherited Members
Methods
Sets the action, controller name and route values of INavigatable object.
public static void Action(this INavigatable navigatable, RouteValueDictionary routeValues)
The INavigatable object.
routeValuesRouteValueDictionaryThe route values of the Action method.
Sets the action and controller name, along with Route values of INavigatable object.
public static void Action(this INavigatable navigatable, string actionName, string controllerName, object routeValues)
The INavigatable object.
actionNamestringAction name.
controllerNamestringController name.
routeValuesobjectRoute values as an object
Sets the action, controller name and route values of INavigatable object.
public static void Action(this INavigatable navigatable, string actionName, string controllerName, RouteValueDictionary routeValues)
The INavigatable object.
actionNamestringAction name.
controllerNamestringController name.
routeValuesRouteValueDictionaryRoute values as RouteValueDictionary
Sets the action and route values of INavigatable object.
public static void Action<TController>(this INavigatable item, Expression<Action<TController>> controllerAction) where TController : Controller
The INavigatable object.
controllerActionExpression<Action<TController>>The controller action.
Generating url depending on the ViewContext and the IUrlGenerator generator.
public static string GenerateUrl(this INavigatable navigatable, ViewContext viewContext, IUrlGenerator urlGenerator, RouteValueDictionary routeValues)
The INavigatable object.
viewContextViewContextThe ViewContext object
urlGeneratorIUrlGeneratorThe IUrlGenerator generator.
routeValuesRouteValueDictionaryThe route values.
Returns:Generating url depending on the ViewContext and the IUrlGenerator generator.
public static string GenerateUrl(this INavigatable navigatable, ViewContext viewContext, IUrlGenerator urlGenerator)
The INavigatable object.
viewContextViewContextThe ViewContext object
urlGeneratorIUrlGeneratorThe IUrlGenerator generator.
Returns:Gets an IUrlHelper instance from the action context.
public static IUrlHelper GetUrlHelper(ActionContext context)
The action context.
Returns:An IUrlHelper instance.
Determines whether this instance has value.
public static bool HasValue(this INavigatable navigatable)
true if either ActionName and ControllerName, RouteName or Url are set; false otherwise
Determines whether the navigatable item is accessible to the current user based on authorization rules.
public static bool IsAccessible(this INavigatable item, ViewContext viewContext, INavigationItemAuthorization authorization)
The navigatable item.
viewContextViewContextThe view context.
authorizationINavigationItemAuthorizationThe navigation item authorization service.
Returns:True if the item is accessible; otherwise, false.
Determines whether all navigatable items in the collection are accessible to the current user based on authorization rules.
public static bool IsAccessible<T>(this IEnumerable<T> items, ViewContext viewContext, INavigationItemAuthorization authorization)
The collection of navigatable items.
viewContextViewContextThe view context.
authorizationINavigationItemAuthorizationThe navigation item authorization service.
Returns:True if all items are accessible; otherwise, false.
Determines whether the specified navigatable matches the current request URL.
public static bool IsCurrent(this INavigatable navigatable, ViewContext viewContext, IUrlGenerator urlGenerator)
The INavigatable object.
viewContextViewContextThe ViewContext object.
urlGeneratorIUrlGeneratorThe IUrlGenerator generator.
Returns:Sets the route name and route values of INavigatable object.
public static void Route(this INavigatable navigatable, string routeName, object routeValues)
The INavigatable object.
routeNamestringRoute name.
routeValuesobjectRoute values as an object.
Sets the route name and route values of INavigatable object.
public static void Route(this INavigatable navigatable, string routeName, RouteValueDictionary routeValues)
The INavigatable object.
routeNamestringRoute name.
routeValuesRouteValueDictionaryRoute values as RouteValueDictionary.
Sets the url property of INavigatable object.
public static void Url(this INavigatable navigatable, string value)
The INavigatable object.
valuestringThe Url.