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
0123b38840
Adding missing files to kproj
2014-06-09 14:55:50 -07:00
Pranav K
59e419ba0a
Adding support for @Inject to Mvc
2014-06-09 13:43:08 -07:00
Javier Calvarro Nelson
c98bc503e8
Check for result.Body.Length = 0 instead of checking that the body is the empty string
2014-06-09 13:35:42 -07:00
Javier Calvarro Nelson
2523d5d9ea
Addressed feedback from @rynowak
2014-06-09 13:35:39 -07:00
Javier Calvarro Nelson
5ba74f500c
Incorporated code review feedback
2014-06-09 13:35:35 -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
Pranav K
822d84a2b4
Use default values when binding action arguments
...
Fixes #545
2014-06-09 11:44:26 -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
bd08a2ca62
fix a build break due to api change
2014-06-06 11:06:41 -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
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
Pranav K
06362db5dc
Adding unit test for ViewResult
2014-06-03 13:53:51 -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
Pranav K
6f3511379f
Modify JsonResult to generate results in UTF8 without BOM by default
...
Fixes #577
2014-05-30 10:52:15 -07:00
David Fowler
1284ab63b6
Re-enabled the test
2014-05-29 22:42:50 -07:00
David Fowler
c6f8244f79
Unblock the build
2014-05-29 02:20:55 -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
Pranav K
d8ba998dec
Change IValueProviderFactory.GetValueProvider to be synchronous.
2014-05-27 14:08:13 -07:00
David Fowler
7388dece9f
Fixed project.json casing
2014-05-26 02:50:43 -07:00
Pranav K
a834928f1a
Change IsValid method in ModelStateDictionary to GetValidationState
...
Fixes #400
2014-05-21 19:33:36 -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
Andrew Peters
f13865dedc
Updating copyright headers
2014-05-08 23:01:20 -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
David Fowler
3b31df3d29
React to renames
2014-05-08 03:24:18 -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
lajones
235707ec8a
Microsoft.ComponentModel.DataAnnotations is being renamed to Microsoft.DataAnnotations
2014-05-07 13:35:36 -07:00
harshgMSFT
bbafa0a29a
Tests for AntiForgery System.
2014-05-07 10:27:01 -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
Wei Wang
e800fcd44f
Eliminate duplicated dependencies
2014-05-06 15:27:10 -07:00
Pranav K
076dedcca5
Reacting to package and namespace changes
2014-05-06 14:06:29 -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
7a8dc36553
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, but can be overridden by
implementing IOrderedFilter.
2014-05-05 14:03:01 -07:00
Louis DeJardin
bbcac43aaa
Updating DataAnnotations version reference
2014-05-02 20:53:12 -07:00
Hao Kung
9bf42374b0
Fix for moving extension methods to IServiceCollection
2014-05-02 12:37:05 -07:00
N. Taylor Mullen
4494f40d67
Addressed code review comments.
2014-05-02 12:16:28 -07:00
N. Taylor Mullen
c986c663e3
Add tests to ensure cshtml ending for full path view names.
...
#206
2014-05-02 12:16:26 -07:00
Ryan Nowak
f5b3ae4a3b
Renaming Exception Filter methods
...
These were accidentally the same names as the action filter methods.
Oopsies. Name taken from MVC and appended Async for the async version
because that's how we roll.
2014-05-01 23:14:47 -07:00
dougbu
392aa464b2
Oops wrong test
2014-05-01 19:22:16 -07:00
dougbu
a2ba36498a
TEMPORARILY disable ClientRulesWithCompareAttribute_ErrorMessageUsesOverride
...
- test failing under CoreCLR
- leave it running under .NET 4.5
2014-05-01 19:12:23 -07:00
dougbu
222c763b72
Revert "Correcting WebFx failure on CI machines"
...
- previous attempt didn't work
This reverts commit a626896b80 .
2014-05-01 19:08:37 -07:00
dougbu
a626896b80
Correcting WebFx failure on CI machines
...
- a single test is failing under CoreCLR only
- using the resource-related properties of a `ValidationAttribute` in
precisely one place – the failing test.
- in .NET the DataAnnotations assembly is somehow able to get access to
`internal` resources
- that doesn’t work under CoreCLR
- short-term fix is to add an `[InternalsVisibleTo]` in the test
assembly, giving DataAnnotations access to the resource
Will also file a bug in the DataAnnotations repo
2014-05-01 19:01:53 -07:00
anpete
8208cd6b2f
Update file headers
2014-05-01 17:42:33 -07:00
Ryan Nowak
81611f13da
TEMPORARILY turning off warnings as errors to unblock the CI
2014-04-30 21:55:17 -07:00
harshgMSFT
3765abdfca
Adding Support for LinkGeneration for named Routes.
...
- Adding HtmlHelpers for route link generation.
- Controller Helpers
- UrlHelper and UrlHelperExtensions
2014-04-30 18:34:46 -07:00
Ryan Nowak
8ae1865740
Fix for part of #339
...
Treat actions with a dynamic constraint or httpmethod constraint as
'better' than those with just route constraints.
This is the first criteria used to filter down the 'best' match, so it's
applied before parameter-arity.
2014-04-30 13:25:48 -07:00
Ryan Nowak
20c8dece7b
Adding IFilterFactory
...
This is a generalized factory/provider for filters - TypeFilterAttribute
and ServiceFilterAttribute are now implemented in terms of this interface.
2014-04-30 13:18:10 -07:00
sornaks
d63d998e95
Introducing DisplayText, DisplayTextFor, Id, IdFor, IdForModel.
...
Fixing CachedDataAnnotationsModelMetadata to support NullDisplayText.
2014-04-30 10:23:25 -07:00
Sebastien Ros
b3046a0285
AllowAnonymous can override AuthorizeAttribute
...
#309
2014-04-28 14:04:10 -07:00
Sebastien Ros
e5aeb738e3
Adding a unit test for AuthorizeAttribute
...
#314
2014-04-28 13:57:29 -07:00
Pranav K
f740aabb79
Reviving RangeAttributeAdapter, RequiredAttributeAdapter,
...
StringLengthAttributeAdapter
* Adding remaining DataTypeAttribute adapter rules
2014-04-26 11:39:29 -07:00
Pranav K
f5ba63ea1e
Fixing missing files in kproj
...
Fixing typo in sample filter
2014-04-25 14:48:14 -07:00
Ryan Nowak
8eecad9d83
Bringing back UrlHelper.IsLocalUrl
...
This has been compied verbatim from MVC (intentional). The tests have been
modernized a bit as well, but all the cases covered in the original are
there.
This may be moved to HttpAbstractions at some point in the future.
2014-04-25 14:29:00 -07:00
Pranav K
d61915149c
DictionaryBasedValueProvider results null when value is not found
...
* Guard against Dictionary returning null values
2014-04-24 18:10:06 -07:00
Sebastien Ros
0fe028a4dd
Implementing Authorize attribute
...
#272
2014-04-24 16:21:43 -07:00
Pranav K
2ba8780ee0
Reviving MinLength and MaxLength attribute adapters
2014-04-24 15:52:05 -07:00
Pranav K
b0c7dc9220
Make IModelBinder and IValueProvider methods async
2014-04-24 15:16:27 -07:00
N. Taylor Mullen
d46389888d
Modify search location for views.
...
When areas are not provided area locations are not searched for views. Also
added tests for search locations in RazorViewEngine failures.
2014-04-24 14:03:36 -07:00
Pranav K
3671e8c5b4
Reviving CompareAttributeAdapter and ModelClientValidationEqualToRule
2014-04-22 23:11:24 -07:00
Pranav K
cc00d8cff7
Modify TypeConverterModelBinder to use ValueProviderResult.CanConvertFromString to determine if it can convert a
...
value
* Adding support for extra type conversions
2014-04-22 23:00:58 -07:00
David Fowler
40d9fa0019
Added missing dependency
2014-04-21 22:59:26 -07:00
Ryan Nowak
73670fb5d7
CR feedback for filters
2014-04-21 13:34:00 -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
Ryan Nowak
ce1f813a82
More spot fixes for warnings as errors
2014-04-16 20:21:10 -07:00
Ryan Nowak
40e7fcc9ba
Turning on warnings as errors
2014-04-16 20:21:07 -07:00
sornaks
646b711b11
Adding the missed project files for WebFX:156 - Introducing RedirectToAction and RedirectToRoute
2014-04-15 13:49:57 -07:00
Sornakumar
ecd8ddeae4
WebFX 156: Adding support for RedirectToAction and RedirectToRoute
2014-04-15 10:45:57 -07:00
harshgMSFT
1536daa107
Adding NonAction Attribute
2014-04-14 16:18:16 -07:00
dougbu
0e7dff9ca7
Get CoreCLR test builds compiling again
...
- no Mock without .NET 4.5
- reverts part of "Reviving support for IValidatableObject in CoreCLR"
- that was commit 0f6df5405b .
2014-04-12 13:45:11 -07:00
Pranav K
0f6df5405b
Reviving support for IValidatableObject in CoreCLR
2014-04-10 22:09:57 -07:00
dougbu
0d9c052e43
Restore ability to run some tests using CoreCLR
...
- revert part of "Made a few more changes since we have new tooling"
- was commit b1fd5cc689
2014-04-10 17:15:17 -07:00
dougbu
ba08f8e8d8
Cleanup Display, Partial, and Validation extensions
...
- correct file and class names for some HH extensions
- three class names were correct but didn't match containing file
- three class and file names matched but didn't start with HtmlHelper
- clean up trailing whitespace and long lines in changed Extensions.cs files
- `HtmlHelperPartialAsyncExtensions`, `HtmlHelperRenderPartialAsyncExtensions`
and `HtmlHelperValidationExtensions` lacked some `[NotNull]` attributes
- merge extension files by concept
- Display / DisplayFor / DisplayForModel methods all into `HtmlHelperDisplayExtensions`
- Partial / RenderPartial methods all into `HtmlHelperPartialExtensions`
- use `IHtmlHelper<TModel>` everywhere
2014-04-10 17:12:16 -07:00
Ryan Nowak
408d4056b1
Rearrange ViewContext
2014-04-10 11:40:57 -07:00
harshgMSFT
53b76380eb
Adding ActionName Attribute
2014-04-09 15:48:30 -07:00
David Fowler
b1fd5cc689
Made a few more changes since we have new tooling
...
- Remove runtime interface declarations and use
Microsoft.Net.Runtime.Interfaces package
- Made tests compile for net45 and made default
intellisense view net45 for unit tests since Moq
doesn't work
2014-04-09 12:24:16 -07:00
David Fowler
a970fa04ab
Updated to use the new tooling
2014-04-09 12:24:16 -07:00
Pranav K
c8ede78582
Expanding ValueProviderResult to support more data types
...
* Reviving tests for ValueProviderResult
2014-04-09 09:33:29 -07:00
Pranav K
ea3e958563
Adding unit tests for CompositeModelBinder
2014-04-08 18:48:01 -07:00
dougbu
4feb8f4f28
Remove reduncant `ArgumentNullOrEmpty` resource from Core project
...
- came from Rendering but Core already had `ArgumentCannotBeNullOrEmpty`
- moved wording from "argument must not be" to "value cannot be"
Also make similar resources consistent in this repo
- adjust Razor's `ArgumentCannotBeNullOrEmpty` resource to use same wording
as Core, adding "The"
- update ModelBinding to also have `ArgumentCannotBeNullOrEmpty` and to use
it consistently with Core and Razor
2014-04-08 12:03:50 -07:00
Sornakumar
b25091f6c1
Merge branch 'WebFX156' into dev
2014-04-08 10:52:38 -07:00
sornaks
7c8dd45b8b
WebFX 156 - Adding support for Redirect and RedirectPermanent
2014-04-08 10:49:56 -07:00
harshgMSFT
01527cd4df
Adding HttpPost, HttpDelete, HttpPut, HttpPatch attributes
2014-04-07 22:31:48 -07:00
Ryan Nowak
faa8251b70
Merging Mvc.Rendering and Mvc.Core
2014-04-07 17:32:49 -07:00
harshgMSFT
652e89b343
Adding HttpGetAttribute and AcceptVerbsAttribute.
...
HttpPost, HttpDelete, HttpPut and HttpPatch would be similar.
Also adding few tests.
2014-04-07 15:10:22 -07:00