Commit Graph

226 Commits

Author SHA1 Message Date
Doug Bunting 687b174b63 Accept VS changes to avoid noise later 2014-11-04 22:42:51 -08:00
Doug Bunting f7ef604b86 Regenerate .kproj files
- does not seem to have a negative impact
- e.g. sample web projects run / debug fine
2014-11-04 22:41:53 -08:00
Pranav K 3aaeebd9c5 Revert "Revert "Added a functional test for view precompilation""
This reverts commit 6b2ab32885.
2014-10-30 14:38:44 -07:00
jacalvar 6b2ab32885 Revert "Added a functional test for view precompilation"
This reverts commit 310feeb826.
2014-10-28 19:14:50 -07:00
jacalvar 310feeb826 Added a functional test for view precompilation 2014-10-28 18:38:15 -07:00
Doug Bunting 1f670bf3a7 Merge branch 'release' into dev 2014-10-27 16:43:02 -07:00
Doug Bunting 4bde6f6caf Add "/home/nulluser" view to MVC sample
- exercises display and editor helpers when `Model==null`
2014-10-27 16:25:48 -07:00
Ryan Nowak 0a3ad09466 Rename GlobalModel -> ApplicationModel
This also comes with a rename of the namespace
Microsoft.AspNet.Mvc.ApplicationModel to
Microsoft.AspNet.Mvc.ApplicationModels.

Also tuned up some parameter and variable names for increased
understandability.
2014-10-23 16:03:55 -07:00
Ryan Nowak df8f84b772 Fix #1287 - Port WebAPI parameter binding behavior
This change modifies the default parameter binding behavior for an
ApiController to use the WebAPI rules.

'simple types' default to use route data or query string
'complex types' default to use the body (formatters)

Adds ModelBindingAttribute to enabled model binding
2014-10-17 16:51:48 -07:00
Pranav K 66f626b828 Remove unnecessary references from project.json 2014-10-17 14:26:58 -07:00
sornaks 99ad37fa99 Issue #1311: Samples should be able to run on Mono.
Fix: Adding support for Kestrel server and fixing the paths for mono.
2014-10-17 14:08:22 -07:00
Doug Bunting 012e03e5d0 Add `InputTagHelper`
- also make `TagHelperOutputExtensions.MergeAttributes()` case-insensitive

nits:
- deliniate attribute names in all resource strings
- update validation messages in TagHelperSample.Web
2014-10-16 23:34:10 -07:00
NTaylorMullen 9c07055ac7 Add ValidationSummaryTagHelper.
- Tested ValidationSummaryTagHelper behavior.
- Updated sample to utilize new ValidationSummaryTagHelper format.

#1251
2014-10-16 21:13:05 -07:00
N. Taylor Mullen 70e695b665 Moved @addtaghelper to ViewStart.
- Updated project.json to have a valid webroot. Webroot isn't pointing to the specific folder because the TagHelperSample has no valid content for the webroot yet.
2014-10-16 21:13:01 -07:00
NTaylorMullen 20cc294c70 Reacted to options and hosting changes after rebase. 2014-10-16 21:12:38 -07:00
Doug Bunting eb7c82d7c2 Add `IHtmlGenerator` to DI and enable MVC tag helpers in TagHelperSample.Web
- also fix a couple of minor issues in TagHelperSample.Web
2014-10-16 21:09:03 -07:00
Doug Bunting 659e759de2 Add TagHelperSample.Web 2014-10-16 21:08:55 -07:00
Stephen Halter a21ed4bc51 Replace calls to GetService<T> with GetRequiredService<T>
Even though GetService<T> still exists, GetRequiredService<T> preserves
the old behavior of throwing for missing services.
2014-10-16 14:51:41 -07:00
jacalvar 9a08e42612 Add WebRoot node to project.json on MvcSample.Web 2014-10-16 12:58:30 -07:00
Hao Kung 448ac5a0dc React to options and hosting changes 2014-10-14 19:20:28 -07:00
Pranav K 4ec6da1ed3 Adding RenderSectionAsync to RazorPage
Fixes #845
2014-10-13 17:44:49 -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
YishaiGalatzer 13ee27c92c Rename IControllerAssemblyProvider to IAssemblyProvider and follow through resultant renames 2014-10-11 13:26:07 -07:00
Hao Kung b6bd7f5d78 React to UsePerRequestServices 2014-10-09 14:17:04 -07:00
Hao Kung 6dfcfaa7eb React to options changes 2014-10-08 12:56:53 -07:00
sornaks a88f59fc49 Issue #1176: Renaming ActionDescriptor, ActionDescriptorProvider, ActionInvoker, ActionInvokerProvider, ActionExecutor, ModelBuilder, Tests. Either dropping "Reflected" or changing it to "Controller" depending on the context. 2014-10-06 20:21:55 -07:00
David Fowler 20431d8963 Removed another unneeded dependency 2014-10-05 13:47:52 -07:00
David Fowler 5890b5b254 Fixed up references 2014-10-05 13:24:00 -07:00
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
jacalvar a2023d35ee [Fixes #429] FileResult
1) Implemented FilePathResult to efficiently return files from disk.
2) Implemented FileStreamResult to return content from a stream.
3) Implemented FileContentResult to return content from a byte array.
2014-10-02 12:50:24 -07:00
Pranav K ad8ab4b8fd Adding support for ViewLocationExpanders to allow modifying view locations
without changing the view engine.

Fixes #1039
2014-10-01 16:15:25 -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 3cd6d3e060 Adding Api Explorer 2014-09-25 15:31:51 -07:00
Ryan Nowak 7ed2de297e moving global filters to options 2014-09-15 15:34:45 -07:00
David Fowler 18400481b5 Cleaned up the mvc sample
- Removed unnecessary dependencies
- Removed web.config
- Use overload of UseServices that automatically adds options
2014-09-15 09:51:00 -07:00
Chris Ross 85ad1aeb96 Handle IBuilder rename to IApplicationBuilder. 2014-09-10 14:12:08 -07:00
YishaiGalatzer 8fd7cd51e2 Fix the sample to await when writing directly to the output stream in a controller. 2014-09-09 08:39:44 -07:00
sornaks 28e334d3db Issue #668: Sample should be covered by a basic functional test. 2014-09-04 14:07:46 -07:00
David Fowler 34add2249e Updated to use the new target framework in project.json 2014-09-04 02:02:40 -07:00
Pranav K a931e21456 Adding support for flush points in Razor pages
Fixes #1042
2014-08-29 09:30:23 -07:00
David Fowler 2e6e5307f6 Updated to use the new target framework in project.json 2014-08-28 22:14:10 -07:00
YishaiGalatzer e40dbcaebf Prevent flushing when writing out from the formatters.
Also make the XML formatter respect object as a return type.

Issues: MVC/1073, MVC/972, MVC/958

1072 is a followup work item to add test coverage.
2014-08-28 14:15:07 -07:00
harshgMSFT 944fafb589 Fixing sample 2014-08-17 01:34:13 -07:00
David Fowler fa6b3acc4a Removed source files from the project 2014-08-15 09:14:49 -07:00
Javier Calvarro Nelson 3ab0c3af29 [Issue #733] Attribute Routing: Implement Order
1. Added an Order property to IRouteTemplateProvider, ReflectedAttributeRouteModel,
   AttributeRouteInfo, AttributeRouteLinkGenerationEntry and AttributeRouteMatchingEntry.

2. Changed the implementation of AttributeRoute to take the order into account when routing
   incomming requests and generating links.

3. Ensured a stable ordering of route entries with the same order and precedence for route
   matching and link generation based on the template text.

4. Added tests to validate that the precedence gets respected in route matching and link generation.

5. Added tests to validate that the order gets respected in route matching and link generation.

6. Added tests to validate that the order gets respected over the precedence for route matching
   and link generation.

7. Added tests to validate that routes with the same order and precedence expose a stable ordering
   for route matching and link generation.
2014-08-14 11:21:05 -07:00
harshgMSFT 6ee034e64f ProducesAttribute +
Adding Functional Tests

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/project.json
	test/Microsoft.AspNet.Mvc.FunctionalTests/project.json

Adding Resources + tests

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx

Adding produces content Attribute

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
2014-08-11 17:52:55 -07:00
harshgMSFT 927821a8ac Data Token support changes 2014-08-11 11:38:10 -07:00
dougbu 56d66c090e Make HTML helper `null` handling consistent
- #874 lines 3, 4, and 6
- correct `Value()` to treat a `null` expression name the same as `string.Empty`
- add missing `[NotNull]` attributes in `EditorExtensions` and for `GenerateIdFromName()`
- consistently pass `null` for default expression names to the helpers
 - for example, from extension methods
- add test cases using `null` for expression name

nits:
- correct summary XML comment for `HtmlHelper` class
- use named parameters and prefer interface (not extension) methods in changed calls
- use `string.Empty` instead of `""` in a few tests
2014-08-06 16:04:56 -07:00
Ryan Nowak 2987f98283 Adding parameter replacement 2014-07-29 16:14:57 -07:00
Javier Calvarro Nelson b0d52f73fd [Issue #527] Revive common ActionResults - Part 1.
1. Added HttpNotFound() to Controller.
2. Updated HttpStatusCodeResult to expose the StatusCode as a property.
3. Added unit tests for HttpNotFound() and for HttpStatusCodeResult.
4. Updated the MvcSample to add an action that uses HttpNotFound().
5. Brought back HttpNotFoundResult and added unit tests for it.
2014-07-25 13:04:59 -07:00