Commit Graph

885 Commits

Author SHA1 Message Date
Kiran Challa acb2a99e9f [Fixes #1283] Add functional tests for WebAPI-style controllers returning HttpContent 2014-10-16 01:52:33 -07:00
Pranav K 75c6327b2e Layout property needs to be propogated between nested view starts
Fixes #1364
2014-10-15 18:54:02 -07:00
Pranav K de77c92a0a Reviving PartialViewResult and associated methods on Controller
Fixes #824
2014-10-15 18:28:08 -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
Pranav K 44d888c319 ViewStartUtility should not return current path if current is a view start
file
2014-10-15 15:05:27 -07:00
sornaks 2c4b3dd3fc Issue #937: Adding functional tests for Filters. 2014-10-15 14:24:53 -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
Harsh Gupta ebf64ce4e3 Adding HttpResponseException to WebApi Shim. 2014-10-15 09:07:40 -07:00
David Fowler d915994f0b Only load loadable assemblies 2014-10-15 00:00:15 -07:00
Hao Kung 448ac5a0dc React to options and hosting changes 2014-10-14 19:20:28 -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
Pranav K 2d67f2fc27 Modify precompilation to always generate instrumentation 2014-10-14 16:10:33 -07:00
sornaks 5fa8a91111 -Issue #913 - Model-binding is being case-sensitive when binding Url data to Enum parameter.
Fix: Using TypeConverter solves this problem.
-Issue #1123 - TypeConverterModelBinder cannot bind "byte" and "short".
Fix: Modified code to use TypeConverter which can handle these scenarios.
-Removing the GetConverterDelegate method and making the code similar to the WebApi.
2014-10-14 15:36:52 -07:00
Pranav K a41b9dc983 Add Html.Partial - sync versions of Html.PartialAsync
Fixes #1107
2014-10-14 15:15:50 -07:00
Pranav K d9ebb37906 Removing Microsoft.AspNet.Mvc dependency from ModelBinding 2014-10-14 12:22:29 -07:00
SonjaKhan 0f5bbdf417 updating ILogger, see aspnet/Logging#3 2014-10-14 10:25:01 -07:00
Pranav K 3f29de5a5f Ensure PDB writer component is available before emiting PDB
Ported from
36cd4901f6

Fixes #1324
2014-10-14 06:17:52 -07:00
Kiran Challa dd587f743b [Fixes #1331] Dispose HttpResponseMessage once its written out in HttpResponseMessageOutputFormatter 2014-10-13 22:34:36 -07:00
Pranav K 4ec6da1ed3 Adding RenderSectionAsync to RazorPage
Fixes #845
2014-10-13 17:44:49 -07:00
jacalvar 39376617cc [Fixes #809] Multiple [Http*] verbs should create multiple actions 2014-10-13 15:25:53 -07:00
jacalvar 3f54492930 [Fixes #885] API Explorer: Link Generation
1) Expose the simplified relative path template by cleaning up constraints, optional and catch all tokens from the template.
2) Expose the parameters on the route template as API parameters.
3) Combine parameters from the route and the action descriptor when the parameter doesn't come from the body. #886 will refine this.
4) Expose optionality and constraints for path parameters. Open question: Should we explicitly expose IsCatchAll?
2014-10-13 15:20:38 -07:00
Pranav K a633ef4f97 Modify Razor components to use RazorViewEngineOptions.FileSystem
Fixes #1302
2014-10-13 14:34:31 -07:00
YishaiGalatzer 4166c8cbc9 Fix unit test 2014-10-13 10:13:32 -07:00
Pranav K d912f6cd39 Removing unused types
Fixes #1344
2014-10-13 05:15:26 -07:00
YishaiGalatzer 0d603a38cf PR feedback and sort/clean MvcServices 2014-10-12 16:37:17 -07:00
Pranav K 18e11f546d DecorateWriter does not get called for partial views rendered via
Html.PartialAsync

* Introducing StringCollectionTextWriter to buffer the contents of
  PartialAsync
* Ensure DecorateWriter is called for partial views

Fixes #1266
2014-10-12 14:24:29 -07:00
Pranav K 20eadb94ee Remove instrumentation from public API surface
Fixes #1262
2014-10-12 12:57:04 -07:00
YishaiGalatzer 75084ba0cd Move caching of compilation results to its own layer.
This will allow only creating the razor compilation when really needed, with the right lifetime.
2014-10-11 15:35:11 -07:00
YishaiGalatzer 13ee27c92c Rename IControllerAssemblyProvider to IAssemblyProvider and follow through resultant renames 2014-10-11 13:26:07 -07:00
Pranav K 7fabb80991 Reacting to CoreCLR version changes 2014-10-10 15:14:04 -07:00
Ryan Nowak 9ad3d5e68f Separate ApiControllers from MVC Controllers in routing 2014-10-10 13:42:12 -07:00
Ryan Nowak 3968df90e4 Fix issue #1282 - Add Request.CreateResponse extension methods
Adds the set of CreateResponse/CreateErrorResponse extension methods that
return an HttpResponseMessage.

For the overloads that perform content negotiation they will access the
collection of MediaTypeFormatters through the shim options. Note that
CreateResponse and friends use the OLD formatters.

Also, HttpError and CreateErrorResponse assume ErrorDetail == false. Using
the shim you will not get detailed error messages unless you construct the
HttpError instance yourself.
2014-10-10 13:42:09 -07:00
Harsh Gupta 5a83383179 Adding ApiController.Validate : Fixes #1286 2014-10-10 13:42:06 -07:00
Ryan Nowak 22869b41c0 Fix issue #1280 - Add HttpResponseMessageFormatter
Adds a formatter that can convert an HttpResponseMessage returned from an
action into HttpContext.Response output.
2014-10-10 13:42:02 -07:00
Ryan Nowak aad3ae42ca Fix for issue #1281 - Add ModelBinder for HttpRequestMessage
This change adds a ModelBinder that can bind an HttpRequestMessage to an
action parameter.

This builds on an earlier change to construct and store the request
message in the HttpContext via an http feature.
2014-10-10 13:41:59 -07:00
Ryan Nowak e51e0e1d52 Fix for issue #1279 - Add .Request property to ApiController
This change adds a .Request property to the ApiController class that can
be used to access an HttpRequestMessage wrapping the HttpContext.

The HttpRequestMessage is stored in an http feature to make it accessible
to model binders and other infrastructure.
2014-10-10 13:41:55 -07:00
Ryan Nowak 9b11c1d90f Fix #1276 - Implement WebAPI action conventions and overloading
This change adds ApplicationModel conventions that can enable WebAPI
action conventions (verb mapping) and WebAPI overloading.

The conventions activate when a controller has a marker attribute.
ApiController has this attribute, so any ported code will automatically
opt-in.

Also ported some old tests for action selection to our new functional test
framework.
2014-10-10 13:41:50 -07:00
Ryan Nowak 2578b8107f Fix for #1277 - Add Options/Startup API for WebAPI shim
Adds an options class, as well as a default options setup that will
configure the default set of formatters.

Currently most of what options needs to do is a placeholder, but it later
do things like add ApplicationModelConventions, filters, formatters, model
binders, etc. Those will be added in follow up items.
2014-10-10 13:41:46 -07:00
Ryan Nowak d9fe305802 Fix for #1275 - Adding ApiController
This change includes the basic properties that we're providing for
compatability as well as some functional tests and unit tests that verify
that ApiController can be a controller class.
2014-10-10 13:41:42 -07:00
Ryan Nowak f66345263d Add WebApiCompatShim project structure 2014-10-10 13:41:35 -07:00
Harsh Gupta e319fef5cb Adding CancellationTokenModelBinder. 2014-10-10 12:16:49 -07:00
Pranav K ad208442d8 Updating functional tests to restore CallContextServiceLocator.Locator.Service on test finish 2014-10-10 11:54:00 -07:00
Pranav K b19764d922 Reacting to CLR package versioning changes 2014-10-10 10:34:01 -07:00
NTaylorMullen fb6b1748a6 Move ITagHelperActivator DI registration.
- Moved the ITagHelperActivator registration in MvcServices to sit with the RazorPage pieces (it's used on the RazorPage).
2014-10-10 00:45:06 -07:00
YishaiGalatzer 275f63e91f Prevent Roslyn from loading prematurely on cold start 2014-10-09 23:34:02 -07:00
N. Taylor Mullen 75a77e2d01 Add tests to validate attribute value rendering.
- Exposed internals from Mvc.Razor.Host to Mvc.Razor.Test so it can use the MvcRazorHost override that takes the IFileSystem.
- Added end-to-end code generation tests for TagHelpers with ModelExpression properties.

#1241
2014-10-09 22:47:26 -07:00
NTaylorMullen 2005c3cd85 Add ModelExpression code generation.
- Sealed the ModelExpression.
- We use the stringified version of the ModelExpression type name to detect ModelExpression properties on TagHelpers. This is so the MvcRazorHost can work in tooling and in runtime.
- Created a GeneratedTagHelperAttributeContext to represent the specific stringified versions of the ModelExpression assets.
- Created an MvcTagHelperAttributeValueCodeRenderer to modify rendering of ModelExpression properties.

#1241
2014-10-09 22:47:25 -07:00
Ryan Nowak ad76a3c8fb Fixing a bad merge on Mvc.sln 2014-10-09 19:13:29 -07:00
YishaiGalatzer 80ef37ab0a Add unit tests to controller properties 2014-10-09 18:18:03 -07:00