https://github.com/aliostad/apiactionselector
https://github.com/aliostad/apiactionselector
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/aliostad/apiactionselector
- Owner: aliostad
- License: other
- Created: 2013-10-21T21:53:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T21:56:10.000Z (almost 8 years ago)
- Last Synced: 2025-03-20T00:19:15.290Z (about 2 months ago)
- Language: C#
- Size: 461 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
ApiActionSelector
========This library copies necessary code from ASP.NET Web API Source to make ApiControllerActionSelector flexible.
Unfortunately current implementation does not provide any extension point.This class (currently) exposes static property `AmbiguousActionResolver`. This property can be used in case of resolving an ambiguous case.
For example, in this case we pick the first action (just to illustrate):
``` Csharp
ApiActionSelector.AmbiguousActionResolver = (context, actions) => actions.First();
```If you cannot resolve, return null. This will result in the framework to throw the familiar ambiguous action exception.
####NOTE
I will be using this to resolve actions based on headers.