Ryan Nowak
e396f1b451
Adding attribute routing
2014-07-03 18:53:38 -07:00
Pranav K
85cf199ef1
Reacting to CoreCLR package rename
2014-07-01 10:37:56 -07:00
Ryan Nowak
c17d33154f
Fix for #617 - ViewResult can be constructed without a view engine
...
We want result types to be constructable without services.
2014-06-27 17:05:09 -07:00
dougbu
172a5a5500
Address review comments
...
- XML comments for changed `TemplateInfo` properties
- correct `DefaultDisplayTemplateTests` and `DefaultEditorTemplateTests` namespaces
- add a couple of low-level `TemplateInfo` tests
2014-06-27 15:56:51 -07:00
dougbu
88cd886a5b
Ensure `TemplateInfo.FormattedModelValue` & `HtmlFieldPrefix` are not `null`
...
- Fixes #705
2014-06-27 15:56:21 -07:00
Pranav K
e7c2faff32
Unwrap nullable types in PropertyHelper prior to looking up properties
...
Fixes #721
2014-06-27 15:27:51 -07:00
Pranav K
0f0d44c6b3
Fixing ModelChunkVisitorTest to match resource name
...
Fixing stylecop issues
2014-06-27 11:55:24 -07:00
N. Taylor Mullen
83f585e583
Addressed stylecop and CR issues.
...
#568
2014-06-27 11:23:30 -07:00
N. Taylor Mullen
2ad175b687
Add @model specific tests to validate output.
...
#568
2014-06-27 11:23:27 -07:00
N. Taylor Mullen
b808c48faf
Add Model specific code generation.
...
By adding model specific code generation we are able to map the generic "base type" code to the cshtml file. This also involved utilizing the CreateClassDeclaration method in the Microsoft.AspNet.Razor library. Lastly Added a MvcCSharpChunkVisitor to add one more abstraction layer between the Microsoft.AspNet.Razor code and the Mvc code; this makes it so Mvc follows the same class structure as the base Razor parser.
#568
2014-06-27 11:23:21 -07:00
Pranav K
2aacdeca4a
Modify AssociatedMetadataProvider to use PropertyHelper to create accessor
...
Additionally change it to use TypeExtensions.GetReadableProperties to get
property list. This causes it to ignore indexers which should not be
considered.
Fixes #595
2014-06-27 10:50:37 -07:00
Pranav K
3c092cb083
Moving model binders from DI to MvcOptions
2014-06-26 21:49:46 -07:00
Chris Ross
1d3e6b0dd0
Fix breaks from GetFormAsync, IReadableStringCollection.Keys.
2014-06-26 10:56:56 -07:00
Pranav K
24e1ac7ca1
Revive ModelMetadata.ShowForDisplay and ModelMetadata.ShowForEdit
...
Fixes #679
2014-06-23 16:50:09 -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
Pranav K
6ae02b0321
Merge branch 'release' into dev
2014-06-22 22:30:46 -07:00
Pranav K
d39b1a3786
ActionDescriptor.Parameters is not populated by provider
2014-06-20 19:28:28 -07:00
Tian Pan
4c9f19aafc
Update controller methods to be all virtual
...
Fix #596
2014-06-20 15:40:02 -07:00
Ryan Nowak
e6ba1f23a2
refactor of action descriptor pipeline
...
(cherry picked from commit 634f756e7fd303fc3022563fcd8fb9b1cb47fba2)
2014-06-20 11:11:08 -07:00
Brice Lambson
172dcd179b
Bump version to 6.0.0-*
2014-06-19 11:21:43 -07:00
Yishai Galatzer
14c43c351d
Use request services instead of application services by default
2014-06-16 19:17:12 -07:00
Yishai Galatzer
6aa1f84420
Add Service monitoring as middleware to make sure the monitoring doesn't affect autofac services counts
...
Scoping of three services
Caching of action binding context.
Make input formatters lazy
2014-06-16 19:03:30 -07:00
Tian Pan
e27742fd0b
IsValidActionMethod fails to check static methods.
...
Fix #638
2014-06-16 18:04:09 -07:00
Pranav K
fdbac041f9
Updating designer files by re-running build resx
2014-06-16 16:27:30 -07:00
Pranav K
85bd056780
CreateActionResult should work when action returns Task.
...
Fixes #647
2014-06-16 16:13:18 -07:00
harshgMSFT
170283c724
Fixing StyleCop Issues for issues reported for commit# b58083f73a
2014-06-16 13:16:37 -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
Ryan Nowak
7f34c94de7
Adding a context class for ValueProviderFactories
...
This allows model binding to once again be independent of routing. Sending
RouteContext into model binding was an odd choice from a layering
point-of-view.
2014-06-11 18:03:09 -07:00
Tian Pan
31915f0b46
Remove ComponentResultHelper
...
Fix #598
2014-06-11 11:32:22 -07:00
Tian Pan
e95585dfbd
Remove ActionResultHelper
...
Fix #597
2014-06-11 11:17:45 -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
28516a0ae9
Changes to support DisplayColumn attribute. Updating the MvcSample as well to start using DisplayColumn attribute. Adding UnitTests for the same.
2014-06-10 16:45:55 -07:00
Pranav K
7396f58d99
Support ModelMetaData.IsRequired
...
* Update DataAnnotationsModelValidatorProvider to use ModelMetadata.IsRequired
* Adding tests and updating existing ones that didn't work with IsRequired
Fixes #533
2014-06-10 10:20:24 -07:00
Pranav K
cc0dadc6b6
More Stylecop cleanup for ModelBinding and Razor
2014-06-09 14:27:12 -07:00
Pranav K
59e419ba0a
Adding support for @Inject to Mvc
2014-06-09 13:43:08 -07:00
dougbu
84396ad875
Clean up trailing whitespace in Core project
...
- checked and found no tabs in this project 😄
2014-06-09 11:56:52 -07:00
Pranav K
822d84a2b4
Use default values when binding action arguments
...
Fixes #545
2014-06-09 11:44:26 -07:00
Ryan Nowak
1b7d52c84c
fixing stylecop in .Mvc and .Mvc.Common
2014-06-09 10:12:11 -07:00
harshgMSFT
dd3dafddb8
Mvc Changes corresponding to Routing DI changes. Refer pr#63
2014-06-06 17:22:06 -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
Ryan Nowak
a3314a4805
changing to use list instead of stack
2014-06-06 10:49:58 -07:00
Ryan Nowak
69034b78b8
Issue #65 merge RoutingContext and RequestContext
...
See the relevant PR in aspnet/Routing#60 .
This incorporates the breaking changes.
2014-06-06 10:49:55 -07:00
sornaks
6b836e9e77
Introducing ChallengeResult to call Response.Challenge()
2014-06-06 10:31:18 -07:00
Ryan Nowak
cf0304b897
Fixing style issues in Mvc.Core
2014-06-04 20:40:23 -07:00
Ryan Nowak
ecbc179d76
Fix stylecop in Microsoft.AspNet.Mvc
2014-06-04 20:06:42 -07:00
Pranav K
97e06138ed
Cleaning up StyleCop errors
2014-06-04 13:28:30 -07:00
harshgMSFT
b96da245cb
RouteCollection -> RouteBuilder changes for MVC.
2014-06-03 16:43:54 -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
a6d89c4482
Copy CodePlex #1836 and #1878 fixes over ( Fix #296 ).
...
This change enables user to specify the tag for the wrapping HTML element
generated from ValidationSummary() and ValidationMessage[For]().
Clean up HtmlHelperValidationExtensions.
2014-06-03 00:18:47 -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
a5a9c03d0a
Fixing file name in kproj
2014-06-02 15:02:14 -07:00
Pranav K
19ab3a4fc6
* Moving Utf8EncodingWithoutBOM to a shared type
2014-06-02 11:09:55 -07:00
Pranav K
6f3511379f
Modify JsonResult to generate results in UTF8 without BOM by default
...
Fixes #577
2014-05-30 10:52:15 -07:00
harshgMSFT
e9a31773a9
Fix for Issue #579
2014-05-29 16:34:18 -07:00
David Fowler
812d5328d2
React to aspnet/KRuntime#65
2014-05-28 02:00:03 -07:00
Pranav K
d8ba998dec
Change IValueProviderFactory.GetValueProvider to be synchronous.
2014-05-27 14:08:13 -07:00
Tian Pan
ec8d09dd65
Missing virtual keywords on ExceptionFilterAttribute's OnException & OnExceptionAsync methods #552 .
2014-05-27 11:40:35 -07:00
David Fowler
7388dece9f
Fixed project.json casing
2014-05-26 02:50:43 -07:00
N. Taylor Mullen
a51ae39693
Adjust context property on RazorView.
...
Context is now HttpContext which pulls from ViewContext which is now a member.
#377
2014-05-23 15:45:25 -07:00
Pranav K
a834928f1a
Change IsValid method in ModelStateDictionary to GetValidationState
...
Fixes #400
2014-05-21 19:33:36 -07:00
Pranav K
1adcf14b3d
Renaming Common to Microsoft.AspNet.Mvc.Common
2014-05-21 19:16:45 -07:00
Pranav K
0c66074033
Modify MvcRazorHost to use a fixed namespace for generated views.
...
Fixes #554
2014-05-20 17:00:02 -07:00
Pranav K
a53e378cf4
Updating kproj file to match tooling changes
2014-05-18 20:13:56 -07:00
dougbu
575daeb0d6
Use `+` rather than explicit `PathString.Add()` overloads
2014-05-11 22:44:34 -07:00
dougbu
37b2bf4997
Fix #522 , [MusicStore]: Html.BeginForm() while generating the action url
...
should consider the application base path
- `request.BasePath` was indeed ignored
- also simplify `formAction` calculation using the higher-level
`PathString.Add()` overloads
2014-05-11 22:31:28 -07:00
Yishai Galatzer
db3cdfb97a
Remove content (and versions from AssemblyInfo)
2014-05-11 08:42:32 -07:00
Yishai Galatzer
ece20cacce
Fix #339 , optional parameter detection was broken
2014-05-10 23:41:58 -07:00
Ryan Nowak
b9dbb6fe57
Fixing action selection with complex types - MVC scenarios with more than one parameter are broken right now
2014-05-09 18:08:54 -07:00
Ryan Nowak
88be38a506
Fix for issue #339
2014-05-09 16:54:10 -07:00
N. Taylor Mullen
9eaa62125f
Trim Razor.Host dependencies.
...
Several dependencies were added to the Razor.Host project that weren't needed. Removed them in order to reduce the dependency chain for tooling.
2014-05-09 11:36:09 -07:00
dougbu
dd4fa762d5
Change `BeginForm()` to add query string when called without parameters
...
- use the request's Path and QueryString rather than default Action() return
value
- actual special case detects all parameter values match the defaults
- this slightly expands the scenarios where the query string is added but
removes an odd inconsistency between `html.BeginForm()` and (say)
`html.BeginForm(FormMethod.Post)`
Fixes #278
2014-05-09 10:35:36 -07:00
Andrew Peters
f13865dedc
Updating copyright headers
2014-05-08 23:01:20 -07:00
Yishai Galatzer
55f4dc4f53
Remove the area routes
...
Add id? to the routes
2014-05-08 15:45:10 -07:00
Wei Wang
dc8b5010a0
Merge branch 'sort-dependencies' into dev
...
Conflicts:
src/Microsoft.AspNet.Mvc.Core/project.json
src/Microsoft.AspNet.Mvc.Razor.Host/project.json
src/Microsoft.AspNet.Mvc.Razor/project.json
2014-05-08 11:16:25 -07:00
Wei Wang
bc9cc68bf0
Fix position of brace
2014-05-08 10:50:10 -07:00
David Fowler
3b31df3d29
React to renames
2014-05-08 03:24:18 -07:00
David Fowler
6fb34c6ab7
React to renames
2014-05-08 03:06:18 -07:00
David Fowler
c94cfc5b0e
Updated to use the new Roslyn.
2014-05-07 22:53:45 -07:00
Wei Wang
7b2feab670
Sort dependencies and remove duplicates in dependencies
2014-05-07 18:24:04 -07:00
Pranav K
4566947e33
Change ModelState.IsValid back to bool
2014-05-07 17:41:47 -07:00
Ryan Nowak
b2c9b3b5d3
Unblocking the CI
...
DataAnnotations used to reference System.Reflection.Compatibility, which
was giving us a reference to some methods "for free". Really we should
have been pulling in this package all along.
2014-05-07 15:58:24 -07:00
lajones
235707ec8a
Microsoft.ComponentModel.DataAnnotations is being renamed to Microsoft.DataAnnotations
2014-05-07 13:35:36 -07:00
sornaks
3b7983181d
WebFX 98 - Adding GetValidationAttributes support
2014-05-07 12:52:48 -07:00
harshgMSFT
bbafa0a29a
Tests for AntiForgery System.
2014-05-07 10:27:01 -07:00
harshgMSFT
b444f66689
Adding ValidateAntiForgeryTokenAttribute also fixing a bug in token deserialization.
2014-05-07 10:01:06 -07:00
Pranav K
904c91d2b9
CompositeModelBinder should only validate the object graph at the top
...
level.
DataAnnotationsModelValidator should prefer the container to Metadata.Model
Fixes #247
2014-05-06 17:39:50 -07:00
Chris Ross
18d3395a5e
Rename ServiceCollectionExtension class.
2014-05-06 16:21:17 -07:00
Pranav K
076dedcca5
Reacting to package and namespace changes
2014-05-06 14:06:29 -07:00
harshgMSFT
9b79664e2f
Fixing Build break due to namespace move.
2014-05-06 10:04:58 -07:00
Wei Wang
4210211c79
Update dependency namespace
2014-05-05 20:01:04 -07:00
Ryan Nowak
abbaa11212
Incorporate name changes: HttpAbstractions
2014-05-05 17:14:08 -07:00
Ryan Nowak
4ece9969bf
HttpAbstractions
2014-05-05 16:29:14 -07:00
Sebastien Ros
6f16dabf08
Renaming Microsoft.AspNet.Security namespace
2014-05-05 16:13:54 -07:00
Ryan Nowak
28fee3470f
Controller base class now implements IActionFilter
2014-05-05 15:47:16 -07:00
Ryan Nowak
ae4e3bc61d
Adding controller-as-filter support
...
If the controller implements IFilter, it will be added to the filters
collection.
It's hardcoded to be 'first' as it was in MVC.
2014-05-05 15:43:29 -07:00
dougbu
67b33868a3
Add `ListBox()` and `ListBoxFor()` helper methods
...
- copy from legacy MVC
- get `ListBox[For]()` methods in correct places and working
- also usual stuff: `var`, `[NotNull]`, remove `IDictionary<,>` overloads
- `ListBoxHelper()` -> `GenerateListBox`
- already had all the bits needed in `GenerateSelect()`
- special-case `null` or empty `name` in GenerateSelect()
- ensure `ArgumentException` has correct parameter name
- lower-level problem affected `CheckBox()` as well
- use `ListBox()` and `ListBoxFor()` in MVC sample
- use `ListBox()` in an editor template
2014-05-05 14:26:06 -07:00