/// <summary>
 /// Adds all the routes for the specified controller type to the end of the route collection.
 /// </summary>
 /// <param name="controllerType">The controller type</param>
 public void AddRoutesFromController(Type controllerType)
 {
     if (!PromotedControllerTypes.Contains(controllerType))
     {
         PromotedControllerTypes.Add(controllerType);
     }
 }
예제 #2
0
        /// <summary>
        /// Adds all the routes for the specified controller type to the end of the route collection.
        /// </summary>
        /// <param name="controllerType">The controller type</param>
        public void AddRoutesFromController(Type controllerType)
        {
            AddScannedRoutes = false;

            if (!PromotedControllerTypes.Contains(controllerType))
            {
                PromotedControllerTypes.Add(controllerType);
            }
        }
        /// <summary>
        /// Adds all the routes for the specified controller type to the end of the route collection.
        /// </summary>
        /// <param name="controllerType">The controller type</param>
        public void AddRoutesFromController(Type controllerType)
        {
            if (!FrameworkControllerType.IsAssignableFrom(controllerType))
            {
                return;
            }

            if (!PromotedControllerTypes.Contains(controllerType))
            {
                PromotedControllerTypes.Add(controllerType);
            }
        }