Commit Graph

35 Commits

Author SHA1 Message Date
Ryan Nowak ccb2f2deda React to move of StatusCodes 2015-07-08 12:43:33 -07:00
Ajay Bhargav Baaskaran e2787b3b84 [Fixes #2715] Removed formatter dependency from JsonResult and JsonViewComponentResult 2015-06-25 14:09:32 -07:00
Ajay Bhargav Baaskaran 48e0b3261c [Fixes #2547] Fixed attribute value prefix with dynamic content being ignored 2015-05-18 17:15:38 -07:00
Ryan Nowak cc4ee1068d Fix #2414 Part 2 - Add [DefaultValue(...)] support to the invoker for
action parameters
2015-05-14 13:58:02 -07:00
Kiran Challa 4bed2e6f2b [Fixes #2545] RedirectToRouteResult doesn't use RouteName property when calculating destination URL 2015-05-13 12:35:25 -07:00
James Newton-King ab4cd5c4c4 Add JsonHelper for serializing JSON in views
- remove NotNull from JsonHelper Serialize
2015-05-11 16:01:08 -07:00
Ajay Bhargav Baaskaran d6012d4297 [Fixes #2506] Added overload to Controller.Json to accept JsonSerializerSettings 2015-05-11 12:36:45 -07:00
N. Taylor Mullen 64e726d2b2 Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Yishai Galatzer ed8e5716ea Remove INestedProviderXXX
React to aspnet/DependencyInjection#179
2015-02-23 15:18:39 -08:00
Pranav K 5e69d90076 * Modify DefaultControllerTypeProvider to look at the object graph to
determine if any ancestor has the "Controller" suffix.

* Introduce NonControllerAttribute to opt out of Controller detection.

Fixes #1274
2015-02-15 22:11:37 -08:00
Ajay Bhargav Baaskaran ac6a1a6a80 Replaced status code number with constants 2015-02-05 16:43:59 -08:00
sornaks 6e8cc6ba74 Adding extension methods ConfigureMvcOptions and ConfigureRazorViewEngineOptions. 2015-02-04 14:07:07 -08:00
Chris Ross 91d7e382d1 Consume new strongly typed headers. Remove temp implementations. 2015-01-14 15:51:34 -08:00
Doug Bunting 7eb106676c Add missing license headers
- #EngineeringDay
- license present but incorrect in just a few files
- skip generated files such as Resources.Designer.cs and files under
  test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
2014-11-20 22:54:05 -08:00
Doug Bunting 315908af5f Apply VS' FormatDocument and RemoveAndSort to all *.cs files
- #EngineeringDay
- VS does not yet format auto-properties nicely; reverted what it did

Also revert changes under
- test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles
2014-11-20 21:15:46 -08:00
Ryan Nowak eb6598e1b9 Fix flaky NoContentFormatter test 2014-11-20 17:48:00 -08:00
Doug Bunting 5e067cdb9e Delete trailing whitespace
- #EngineeringDay
- Total replaced: 660  Matching files: 270 in *.cs
- Total replaced: 250  Matching files: 32 in all other files
- Total replaced: 22  Matching files: 8 in a few stragglers

Did not change files under following directories
- test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
- test\Microsoft.AspNet.Mvc.FunctionalTests\compiler\resources
- test\WebSites\TagHelpersWebSite
(Razor generates trailing whitespace in a case or two)
2014-11-20 16:18:09 -08:00
Ryan Nowak 7c961e3ce8 TODO removal
For each of these TODOs:

- If there's an active bug tracking the work, and the TODO provides
  something of value, I left it and standardized the formatting. I also
  added comments to the bug.

- If the comment provided no value (implement feature X when we do feature
  X), I deleted it with impunity.

- If the comment was stale (won't fix or just out of date), then we
  removed it uncerimoniously.

There was a single TODO that was actually actionable, so I enabled that
test.
2014-11-20 15:01:35 -08:00
Ryan Nowak ca92700a6f Adding a functional test that modifies data tokens
Tracked by aspnet/Routing#116

The product support for this feature is in already this change just adds a
test verifying the scenario.
2014-11-17 18:35:04 -08:00
Ryan Nowak e9d8c845d6 Create a new routedata for each 'router' for MVC
This is the MVC companion to https://github.com/aspnet/Routing/pull/122

As routing flows, routes replace the route data and mutate a copy. This
allows users to make changes that dirty the data without affecting
undesired state changes.

We also add the 'next' router for diagnostic purposes.
2014-11-12 11:10:21 -08:00
Ryan Nowak 105c99cbf2 Fix #1370 - Always use the provided formatter in JsonResult
The change here is to always use the provided formatter, instead of using
it as a fallback. This is much less surprising for users.

There are some other subtle changes here and cleanup of the tests, as well
as documentation additions.

The primary change is that we still want to run 'select' on a formatter
even if it's the only one. This allows us to choose a content type based
on the accept header.

In the case of a user-provided formatter, we'll try to honor the best
possible combination of Accept and specified ContentTypes (specified
ContentTypes win if there's a conflict). If nothing works, we'll still run
the user-provided formatter and let it decide what to do.

In the case of the default (formatters from options) we do conneg, and if
there's a conflict, fall back to a global (from services)
JsonOutputFormatter - we let it decide what to do.

This should leave us with a defined and tested behavior for all cases.
2014-10-31 14:30:31 -07:00
Ryan Nowak 7666d5973f fix build issue in coreclr 2014-10-15 17:32:06 -07:00
Ryan Nowak 5f47546d40 Use DefaultOrder in MvcOptionsSetup 2014-10-15 17:12:52 -07:00
Kiran Challa e985c22528 [Fixes #1216] Provide a property on JsonOutputFormatter to set serializer settings
[Fixes #1221] Rename OutputFormatter's WriteResponseContentHeaders to WriteResponseHeaders
[Fixes #932] Setting Json Serializer Settings
2014-10-15 09:27:09 -07:00
jacalvar 1680616fe5 [Issue #1133] RedirectToActionResult and UrlHelper should use HostString, PathString, etc. To build Urls.
Added tests to describe the current behaviour with Unicode hosts.
2014-10-14 16:12:29 -07:00
harshgMSFT 572ec0175c Fix for 1071: Output Formatters should be invoked for writing out the response. 2014-10-03 10:54:59 -07:00
Kiran Challa fdeff1188b [Fixes #926] Protocol & Host name ignored when creating action link 2014-09-26 17:20:56 -07:00
jacalvar 25838cee55 [Fixes #911] RequireHttpsAttribute does not exist in MVC 6
1. GET requests will be redirected to the equivalent HTTPS url.
2. Requests with any other http method will fail with a 400.
2014-09-15 13:07:30 -07:00
Pranav K b8692c2c21 Updating FunctionalTests to use HttpClient abstractions 2014-09-01 11:16:54 -07:00
Chris Ross 240d969899 Add using statement for extension methods. 2014-07-08 10:19:16 -07:00
Pranav K 85bd056780 CreateActionResult should work when action returns Task.
Fixes #647
2014-06-16 16:13:18 -07:00
harshgMSFT 10285d7d39 This additional constraint enables adding a route to the template (and potentially to the UseMvc method) without actually implementing the actual artifact.
For example without adding an area to a controller, a route can still be added to the template.
- Also added functional tests.
2014-06-16 11:24:22 -07:00
Javier Calvarro Nelson 16f19b5cc6 Added functional tests to cover rendering views without layout and
to return a result without content.
2014-06-09 13:35:31 -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
Javier Calvarro Nelson 931a3cd809 Added functional tests for MVC.
Created a test project to hold functional tests, a basic
application for test purposes under test\WebSites and added
the first functional test to validate view rendering.
2014-05-28 12:46:41 -07:00