Commit Graph

23 Commits

Author SHA1 Message Date
Ryan Nowak a2393f21be Adds ControllerBase to Mvc.Core
This change adds a base class for controllers to Mvc.Core that can be used
without a dependency on views, json, etc.

Most of the functionality on Controller moves to ControllerBase. I kept
the IActionFilter and IDisposable functionality on Controller since it's
not really a fit with the 'minimal' philosophy.
2015-12-14 10:29:55 -08:00
ryanbrandenburg 3393ba43c2 * Parameters into the messages 2015-12-11 12:05:44 -08:00
Ryan Nowak 96de1dbe4b Remove IExcludeTypeFilter
- Removes IExcludeTypeFilter
- Replaced with a property 'ValidateChildren' on ModelMetadata
- Teach ValidationVisitor to respect 'ValidateChildren' for enumerable
  types.
2015-12-09 12:30:13 -08:00
Ryan Nowak 07085ca69b Remove IHttpContextAccessor from TempData
This change removes the dependency of TempData on the IHttpContextAccessor
by creating an ITempDataDictionaryFactory abstraction. In general, no one
will replace the factory, it's just indirection.

This allows us to drop our dependency on IHttpContextAccessor, and move it
to the functional tests where we specifically depend on it.

The bulk of code churn here is to update tests that use TempData.
2015-12-02 08:18:57 -08:00
Pranav K 017bf1a20f Changes to use moq-netcore 2015-11-25 16:04:04 -08:00
Kiran Challa 31e42ee312 [Fixes #3433] Invalid media type 'text/plain; charset=utf-8' 2015-11-25 10:50:40 -08:00
Ryan Nowak 4bcf236450 MVC companion to aspnet/Routing#238
This is a companion change to make the RouteValueDictionary type more
promient. Using the concrete type here allows to avoid allocations in a
lot of common scenarios.
2015-11-25 10:36:50 -08:00
Ryan Nowak 8682fe0cfd Replace ActionBindingContext with ControllerContext
This change introduces ControllerContext for inside of Controllers, and
controller-specific extensibility points. ControllerContext carries with
it the model binding infrastructure needed to do all of the things that
controllers need to do.
2015-11-20 15:32:37 -08:00
Doug Bunting 62978229c4 Ease unit testing of `Controller.TryValidateModel()`
- #3586
- reverse conditions to access `_options.Value` only when test has set up an `IStringLocalizerFactory`
2015-11-20 10:37:07 -08:00
ryanbrandenburg b8d58133c3 * Add NoContent Factory to Controller 2015-11-12 14:56:05 -08:00
Ajay Bhargav Baaskaran eb398c811d Added LocalRedirectresult
- Fixes #3346
- Added helper method in controller
- Added relevant tests
2015-10-23 12:58:41 -07:00
Pranav K a602d548e2 Allow ViewFeature tests to run in dnxcore50 2015-10-06 09:46:49 -07:00
Pranav K 18c80d156c Replace NotNullAttribute with thrown exceptions 2015-09-26 23:48:43 -07:00
Kirthi Krishnamraju 0889b18f95 Add localizers to validation attributes 2015-09-25 16:13:21 -07:00
Ryan Nowak a318c4599a API Review - Split up .Actions
Abstractions - Core MVC extensibility

Controllers - MVC implementations of .Abstractions and supporting
contracts

Infrastructure - General purpose support APIs. Metadata APIs that don't
fit clearly with a feature or with .Abstraction
2015-09-21 21:54:02 -07:00
Ryan Nowak 538cd9c191 Move less-commonly used types out of .Rendering 2015-09-16 23:52:29 -07:00
Ryan Nowak 046cb976b3 Move ActionResult classes back to main namespace 2015-09-16 21:42:31 -07:00
Ryan Nowak 076ce6a8a1 Make ModelBindingResult a struct. 2015-09-03 12:52:50 -07:00
Ryan Nowak 229724c4ea Reorganize MVC namespaces 2015-09-01 22:28:33 -07:00
Doug Bunting 6106375306 Add `HttpOkResult`, `HttpOkObjectResult`, and `Ok()` methods in `Controller`
- #2825
- new class names align with existing types such as `HttpNotFoundResult` and `HttpNotFoundObjectResult`
- remove similar types from WebApiCompatShim and use replacements in `ApiController`
 - `NegotiatedContentResult<T>` remains because Core doesn't have an exact replacement

nits:
- add missing periods in some `Controller` doc comments
2015-07-23 18:49:36 -07:00
Hao Kung bf1b188e9f React to Http rename 2015-07-13 12:31:15 -07:00
Ryan Nowak ccb2f2deda React to move of StatusCodes 2015-07-08 12:43:33 -07:00
Ryan Nowak e985fa5d42 Split up MVC.Extensions into smaller packages
Startup.cs API experience to follow in a separate change. This change just
gets the bulk of the code churn out of the way.
2015-07-06 23:41:22 -07:00