src/AspNetCore/Mvc/Mvc/src/ApplicationModels/ISelectedControllerModelConfigurationExtensions.cs
/// <summary>
/// Adds an <see cref="RouteTemplateConvention"/> instance to <see cref="MvcOptions"/> that operates on controller of type
/// <see cref="ISelectedControllerModelConfiguration.SelectedControllerType"/> of <paramref name="configuration"/> and action models.
/// </summary>
/// <param name="configuration"></param>
/// <param name="routeTemplateFormatter"></param>
/// <param name="actionFilter"></param>
/// <returns></returns>
Adds an  instance to  that operates on controller of type
of  and action models.
Adds an instance to that operates on controller of type of and action models .
public static ISelectedControllerModelConfiguration AddSelectorRouteTemplateConventionToSelectedController(this ISelectedControllerModelConfiguration configuration,
            IStringFormatter routeTemplateFormatter, IActionModelFilter? actionFilter = null)
        {
            var controllerFilter = new ControllerTypeFilter(configuration.SelectedControllerType);
            var convention = new RouteTemplateConvention(routeTemplateFormatter, controllerFilter: controllerFilter, actionFilter: actionFilter);
            configuration.AddControllerConvention(convention);
            return configuration;
        }
public static ISelectedControllerModelConfiguration AddSelectorRouteTemplateConventionToSelectedController ( this ISelectedControllerModelConfiguration configuration , IStringFormatter routeTemplateFormatter , IActionModelFilter ? actionFilter = null ) { var controllerFilter = new ControllerTypeFilter ( configuration . SelectedControllerType ) ; var convention = new RouteTemplateConvention ( routeTemplateFormatter , controllerFilter : controllerFilter , actionFilter : actionFilter ) ; configuration . AddControllerConvention ( convention ) ; return configuration ; }
Adds an  instance to  that operates on controller of type
of  and action models.
Adds an instance to that operates on controller of type of and action models .
None
ISelectedControllerModelConfiguration
this
routeTemplateFormatter
IStringFormatter
None
actionFilter
IActionModelFilter?
None
configuration
None