Commit Graph

21 Commits

Author SHA1 Message Date
Ryan Nowak 78a4e78358 Fix for #975 - Implementing IActionConstraint and ActionMethodSelectorAttribute
IActionConstraint follows a provider model similar to filters. The
attributes that go on actions/controllers can be simple metadata markers,
the 'real' constraint is provided by a set of configurable providers. In
general the simplest thing to do is to be both an
IActionConstraintMetadata and IActionConstraint, and then the default
provider will take care of you.

IActionConstraint now has stages based on the Order property. Each group
of constraints with the same Order will run together on the set of
actions. This process is repeated for each value of Order until we run out
of actions or run out of constraints.

The IActionConstraint interface is beefier than the equivalent in legacy
MVC. This is to support cooperative coding between sets of constraints
that know about each other. See the changes in the sample, which implement
webapi-style overloading.
2014-10-03 18:50:01 -07:00
Ryan Nowak 414c009b80 Removing Overloading and Automatic verb-mapping
This change removes WebAPI-style method parameter overloading and the
automatic mapping of 'unnamed' actions based on method names. For all
practicaly purposes, this change restores the MVC5 behavior for action
selection.

WebAPI-style overloading will be brought back in the future via a set of
opt-in constructs.
2014-10-01 18:46:48 -07:00
Ryan Nowak d8995a7767 Fix for #1192 - Support customizing reflected model through attributes
This adds support for attributes which interact with reflected model.
These conventions are applied after all of our built-in constructs so that
you can see and modify the results.
2014-10-01 14:15:34 -07:00
Ryan Nowak 7ed2de297e moving global filters to options 2014-09-15 15:34:45 -07:00
David Fowler 34add2249e Updated to use the new target framework in project.json 2014-09-04 02:02:40 -07:00
Ryan Nowak 8bfb6eb8d5 implement a decision-tree-based action selector 2014-08-14 15:45:45 -07:00
Ben Brown 01f5fec210 Added Logging to Mvc 2014-08-01 15:33:47 -07:00
Ryan Nowak bff94f169f Fix for issue #610 - Ignore internal and nested types
This change exludes internal and nested types from being treated as
controllers. This is consistent with MVC5's behavior.

DefaultActionSelectionConventions was primarily tested through running
action selection. I wanted to also test the methods with substantial logic
in this class, so I moved a spate of a classes from private classes inside of the
integration tests to public classes so they could be shared. I also added
tests to fill gaps in DefaultActionSelectionConventions, which is the vast
vast majority of this change.
2014-07-16 16:33:26 -07:00
Ryan Nowak e396f1b451 Adding attribute routing 2014-07-03 18:53:38 -07:00
Ryan Nowak e6ba1f23a2 refactor of action descriptor pipeline
(cherry picked from commit 634f756e7fd303fc3022563fcd8fb9b1cb47fba2)
2014-06-20 11:11:08 -07:00
Yishai Galatzer 6d78f8adb3 Cache action descriptor providers and provide a race safe data structure to get the version.
The default implementation has a safe race, and does not allow for action description addition at runtime.

It can be replaced with an implementation that can reload.

Consumers of the new service that do extra caching are now responsible to look at the version and change the implementation.
2014-06-06 15:19:30 -07:00
Ryan Nowak 69034b78b8 Issue #65 merge RoutingContext and RequestContext
See the relevant PR in aspnet/Routing#60.

This incorporates the breaking changes.
2014-06-06 10:49:55 -07:00
Andrew Peters f13865dedc Updating copyright headers 2014-05-08 23:01:20 -07:00
Pranav K 076dedcca5 Reacting to package and namespace changes 2014-05-06 14:06:29 -07:00
Ryan Nowak abbaa11212 Incorporate name changes: HttpAbstractions 2014-05-05 17:14:08 -07:00
anpete 8208cd6b2f Update file headers 2014-05-01 17:42:33 -07:00
Ryan Nowak ce1f813a82 More spot fixes for warnings as errors 2014-04-16 20:21:10 -07:00
harshgMSFT 1536daa107 Adding NonAction Attribute 2014-04-14 16:18:16 -07:00
harshgMSFT 53b76380eb Adding ActionName Attribute 2014-04-09 15:48:30 -07:00
harshgMSFT 01527cd4df Adding HttpPost, HttpDelete, HttpPut, HttpPatch attributes 2014-04-07 22:31:48 -07:00
harshgMSFT 652e89b343 Adding HttpGetAttribute and AcceptVerbsAttribute.
HttpPost, HttpDelete, HttpPut and HttpPatch would be similar.
Also adding few tests.
2014-04-07 15:10:22 -07:00