Esempio n. 1
0
		public void RegisterRoutes(IRoutingHandler routingHandler)
		{
			routingHandler.MapRoute("Default","~/{controller}/{action}/{id}", 
				new { 
					Controller = "WebApi", 
					Action = "Index", 
					Id = RoutingParameter.Optional 
				});
		}
Esempio n. 2
0
		public void RegisterRoutes(IRoutingHandler routes)
		{
			routes.MapRoute(
					name: "DefaultApi",
					url: "api/{controller}/{id}",
					defaults: new { id = RoutingParameter.Optional });

			// Uncomment the following line of code to enable query support for actions with an IQueryable or IQueryable<T> return type.
			// To avoid processing unexpected or malicious queries, use the validation settings on QueryableAttribute to validate incoming queries.
			// For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712.
			routes.EnableQuerySupport();
		}
Esempio n. 3
0
		public void RegisterRoutes(IRoutingHandler routes)
		{
			//routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

			routes.MapStaticRoute("/");

			routes.MapRoute(
					name: "Default",
					url: "{controller}/{action}/{id}",
					defaults: new { controller = "Home", action = "Index", id = RoutingParameter.Optional }
			);
		}
Esempio n. 4
0
		public void RegisterRoutes(IRoutingHandler handler)
		{
			handler.MapStaticRoute("~/static");
			handler.MapRoute("","~/catchall/{*allThatCanBe}",
				new
				{
					controller = "CatchAll",
					action = "CatchAll"
				});
			handler.MapRoute("", "~/{controller}/{action}/{id}",
				new
				{
					controller = "Home",
					action = "Index",
					id = RoutingParameter.Optional
				});
		}
Esempio n. 5
0
		public void UnregisterRouting(IRoutingHandler routingService)
		{
			if (_routingHandler == routingService)
			{
				_routingHandler = null;
			}
		}
Esempio n. 6
0
		public void RegisterRouting(IRoutingHandler routingService)
		{
			_routingHandler = routingService;
			ServiceLocator.Locator.Register<IRoutingHandler>(routingService);
			CallClientInitializers();
		}
Esempio n. 7
0
		public UrlHelper(IHttpContext context, IRoutingHandler routingHandler)
		{
			_context = context;
			_routingHandler = routingHandler;
		}