Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Issue: Attribute routing should consider per-controller configuration based action selector [972]

$
0
0
Currently we always take the IHttpActionSelector implementation present on global configuration. We should consider taking it from Per-Controller configuration if present.

HelpPage, for example, currently uses per-controller configuration's action selector during help page generation. We should do the same for attribute routing:
```
private void ExploreRouteActions(IHttpRoute route, string localPath, HttpControllerDescriptor controllerDescriptor, Collection<ApiDescription> apiDescriptions)
{
ServicesContainer controllerServices = controllerDescriptor.Configuration.Services;
ILookup<string, HttpActionDescriptor> actionMappings = controllerServices.GetActionSelector().GetActionMapping(controllerDescriptor);
```

Just to check whether per-controller configuration based action selector could be used with attribute routing, I have tried creating custom action selector on a per-controller configuration and after modification to MapHttpAttributeRoutes to use the controller specific action selector, I noticed that attribute routing, help page and action selection happens based out of my custom action selector. so, it appears we could use action selector out of per-controller configuration.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>