Commit Graph

55 Commits

Author SHA1 Message Date
Doug Bunting ca65b1b6ed Correct recent checkins
- correct typo in 3303286288
 - really seal `CachedModelMetadata.Properties`
- make a couple of test methods `public` (!!)
- add Microsoft.AspNet.PageExecutionInstrumentation to Mvc.sln
- remove `<RootNamespace/>`, `<ProjectExtensions/>`, etc. from .kproj files
2015-02-12 08:53:17 -08:00
Kiran Challa e5176d22f6 [Fixes #1121,#1508] Wrap objects for serialization/deserialization and DelegatingEnumerable<> support for IEnumerable<T> and IQueryable<T> 2015-01-30 18:10:01 -08:00
Doug Bunting 54f88ab190 [cleanup] Update .gitignore and reset .kproj files
- add a couple more exclusions to .gitignore (recent VS additions)
- remove `<ProjectExtensions/>` elements
- update files that don't have the correct output directories
- remove dangling PrecompilationWebSite.kproj file
2015-01-21 22:03:23 -08:00
Chris Ross 91d7e382d1 Consume new strongly typed headers. Remove temp implementations. 2015-01-14 15:51:34 -08:00
Victor Hurdugaci 99b5f430ff Add schema version to kproj files 2014-11-25 10:57:58 -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
David Fowler fa6b3acc4a Removed source files from the project 2014-08-15 09:14:49 -07:00
harshgMSFT 1684d1d322 NoContentFormatter: Writes 204 to the response status code if the value returned is null. 2014-08-14 19:16:26 -07:00
Ryan Nowak b72b44c20c Implement RouteKeyHandling.CatchAll 2014-08-14 15:59:09 -07:00
Ryan Nowak 8bfb6eb8d5 implement a decision-tree-based action selector 2014-08-14 15:45:45 -07:00
Ryan Nowak 3770906c3b Issue #862 Extensibility for action invoker 2014-08-14 13:25:52 -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
sornaks e6f4f0fec6 Introducing Activator for ViewComponents. 2014-08-13 14:22:43 -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
Pranav K 5168808906 Introducing RazorTextWriter
RazorTextWriter represents the result of rendering a page as a sequence of
strings rather than a concatenated string. This avoids building up large
strings in memory.
2014-08-05 10:09:04 -07:00
dougbu d0d7c6aef8 Add `HtmlHelperDisplayTextTest` and `HtmlHelperValueExtensionsTest` classes 2014-08-01 21:06:28 -07:00
Ben Brown 01f5fec210 Added Logging to Mvc 2014-08-01 15:33:47 -07:00
harshgMSFT 19f3f78b3e Adding TextPlainFormatter to always handle returning strings as text\plain format.
Conflicts:
	src/Microsoft.AspNet.Mvc.Common/Encodings.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/JsonOutputFormatter.cs
	src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
	test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectContentResultTests.cs
	test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs
2014-08-01 13:47:23 -07:00
harshgMSFT 307c191c17 Adding support for content negotiation.
This change consists of :
1. Conneg based on request headers, supports the following 3 scenarios:
	a. ContentType property on ObjectResult set to null or is empty.
	b. ContentType property on ObjectResult set to a single content type.
	c. ContentType property on ObjectResult set to multiple content types.

2. Parsing Helpers, comparers and extensions for comparing various http headers.
3. Tests.

Open workitems:
1. Remodel JsonResult and ContentResult to be a derivation of ObjectResult.
2. Populate DeclaredType.

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterDescriptor.cs
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptorExtensions.cs
	src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs
	src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
	src/Microsoft.AspNet.Mvc/MvcServices.cs
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs
	test/Microsoft.AspNet.Mvc.HeaderValueAbstractions.Test/MediaTypeHeaderValueParsingTests.cs
	test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs
2014-07-29 17:26: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
Pranav K 24f74222f5 Introducing Controller.TryUpdateModel
This changeset reintroduces some of the overloads for
Controller.TryUpdateModel.

Fixes #415
2014-07-25 10:08:44 -07:00
Pranav K da0bf6f7d8 Commonizing code in option provider
* Adding ValueProviderFactoryProvider and CompositeValueProviderFactory to
  maintain parity in pattern with other option types.

Fixes #818
2014-07-25 06:52:00 -07:00
dougbu 3746e44dc3 Add more `ModelMetadata` and HTML helper tests
- add `CachedDataAnnotationsMetadataAttributesTest`
- add `CachedDataAnnotationsModelMetadataTest`
- confirm more default property values in `ModelMetadataTest`
- confirm use of `DisplayName` in `ModelMetadataTest`
- add `HtmlHelperDisplayNameExtensionsTest`
- add `HtmlHelperLabelExtensionsTest`
- add `HtmlHelperNameExtensionsTest`
2014-07-24 18:32:35 -07:00
harshgMSFT a2561281b7 Adding MvcOptions.OutputFormatters property. 2014-07-23 17:46:17 -07:00
harshgMSFT 1df4738a19 Adding OutputFormatter base class 2014-07-23 16:50:22 -07:00
Ryan Nowak 745239f09f Adding Attribute Routing Link Generation 2014-07-21 14:52:38 -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
Yishai Galatzer 472e500864 Cache file info access in viewengine
Move compilation and VirtualPathViewFactory to be singletons
And cache access to files.

The cache time is controlled by MVC options.
The cache is implemented in the ExpiringFileInfoCache.cs
2014-07-16 13:12:21 -07:00
Pranav K 5194adfaf5 Moving IViewEngine to MvcOptions 2014-07-08 17:50:13 -07:00
Ryan Nowak e396f1b451 Adding attribute routing 2014-07-03 18:53:38 -07:00
Pranav K 3c092cb083 Moving model binders from DI to MvcOptions 2014-06-26 21:49:46 -07:00
sornaks 15b06a4057 Fixing the TODOs dependent on SimpleDisplayText. 2014-06-23 11:55:16 -07:00
Pranav K cca78bb055 Adding support for ActivateAttribute via IControllerActivator
This mechanism replaces code in Inject that activated properties
by looking them up by names.
2014-06-23 11:00:28 -07:00
Ryan Nowak e6ba1f23a2 refactor of action descriptor pipeline
(cherry picked from commit 634f756e7fd303fc3022563fcd8fb9b1cb47fba2)
2014-06-20 11:11:08 -07:00
Ryan Nowak 1bae3bcaa2 Issue #592 - ActionResult is not being executed by ResultFilterAttribute
The issue here is actually different than described in the bug.
ResultFilter should only short circuit when .Cancel is set to true. This
is consistent with legacy MVC.

Added tests for all of this stuff. There's already good test coverage for
the invoker, what was missing was coverage for the attributes and for the
methods on Controller. ExceptionFilterAttribute and
AuthorizationFilterAttribute don't have short circuiting logic inside of
them, so they are already covered by tests for the invoker.
2014-06-16 12:42:59 -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
harshgMSFT b58083f73a Renaming AntiForgeryConfig-> AntiForgeryOptions.
Adding MvcOptions and updating AntiForgery system to use AntiForgeryConfiguration from MvcOptions
2014-06-12 16:55:49 -07:00
Tian Pan 60443101d5 Enable request to reach base controller class's action
Fix #378
2014-06-11 10:57:19 -07:00
sornaks 6b836e9e77 Introducing ChallengeResult to call Response.Challenge() 2014-06-06 10:31:18 -07:00
sornaks dffc58dedc Issue #242 - Introducing ObjectContentResult 2014-06-03 16:00:36 -07:00
harshgMSFT 483e9038b4 Supporting Urls With ~/ while redirecting.
Fix for Issue#304
2014-06-03 11:29:27 -07:00
Tian Pan 6082cd9f36 View components - More built in return methods (Fix #354)
Modify Content/Json/View return type as strongly-typed.
2014-06-02 23:12:42 -07:00
Pranav K 19ab3a4fc6 * Moving Utf8EncodingWithoutBOM to a shared type 2014-06-02 11:09:55 -07:00
dougbu 065ee36fdd Reflect recently-added file in .kproj
- from commit 6f3511379f
2014-05-30 19:01:33 -07:00
David Fowler 7388dece9f Fixed project.json casing 2014-05-26 02:50:43 -07:00
Pranav K a53e378cf4 Updating kproj file to match tooling changes 2014-05-18 20:13:56 -07:00
harshgMSFT bbafa0a29a Tests for AntiForgery System. 2014-05-07 10:27:01 -07:00
Sebastien Ros 0fe028a4dd Implementing Authorize attribute
#272
2014-04-24 16:21:43 -07:00
Louis DeJardin f19fe0cbef Filters version 2.0
This is functionally much more similar to legacy MVC.

Rather than a pure single pipeline, filter execution takes place in more
stages.
2014-04-17 11:45:58 -07:00