Ryan Nowak
0fcf2448c3
Fix aspnet/Routing#722
...
Exposes a separate change token that will be triggered after action
descriptors have been updated.
2018-08-27 17:24:21 -07:00
James Newton-King
8ed9d0aac2
Use Endpoint instead of RouteEndpoint where possible ( #8331 )
2018-08-28 11:00:11 +12:00
Ryan Nowak
cb0627b28a
Addressing a skipped test
...
I think something that was meant to be revisited in a PR got left
behing. I found this while fixing aspnet/Routing#772 and it seems worth
addressing.
This change removes the hardcoding of action/controller/area in the
data source, and corrects the behavior of required route values when
they aren't in that set.
2018-08-27 15:34:37 -07:00
Pranav K
a7301120b1
Unwrap filter factories in TypeFilterAttribute & ServiceFilterAttribute
...
Fixes #7855
2018-08-24 14:15:40 -07:00
Javier Calvarro Nelson
dfb579d45c
[ Fixes #8021 ] Copy the request headers before sending the request on the RedirectHandler
...
If another handler modifies the request headers the modified headers get
applied on subsequent requests, which is not correct. This change copies
the headers before sending the request and uses the original headers for
the redirect request instead of the potentially modified ones.
2018-08-23 16:09:05 -07:00
Pranav K
8eea0ad44c
Update tests to latest compat switch
2018-08-23 08:09:02 -07:00
James Newton-King
e2de54a92d
Update MvcEndpointDataSource to use RoutePattern ( #8249 )
2018-08-23 21:42:42 +12:00
James Newton-King
03da30f3bf
Replace remaining references to global routing ( #8312 )
2018-08-23 10:23:29 +12:00
James Newton-King
cbe1526763
React to routing changes ( #8303 )
2018-08-22 17:15:09 +12:00
Pranav K
5bd818bd64
Introduce ProblemDetailsFilter
...
Fixes https://github.com/aspnet/Mvc/issues/6786
2018-08-21 17:29:12 -07:00
Pranav K
522006d2c8
[Design] Add a MaxValidationDepth option to ValidationVisitor
...
Fixes #7357
2018-08-16 15:01:18 -07:00
Pranav K
af770ede87
Ignore parameters that specify a model binder type
2018-08-15 12:12:04 -07:00
Ryan Brandenburg
200a70bb86
Update doc comments
2018-08-15 11:42:50 -07:00
Pranav K
7e25d7908a
Warn when the parameter name for a model bound complex parameter has the same name as a top level property
...
Fixes #7753
2018-08-14 15:44:48 -07:00
Kristian Hellang
2421ae8c83
Add IStatusCodeActionResult ( #8265 )
...
* Add IStatusCodeActionResult
* Add unit test for explicitly implemented property on StatusCodeResult
2018-08-13 15:39:20 -07:00
Pranav K
9da8e2c908
Ensure UnsupportedContentTypeFilter runs before ModelStateInvalidFilter
...
Both UnsupportedContentTypeFilter and ModelStateInvalidFilter use ModelState to
determine the response. UnsupportedContentTypeFilter returns a more specific
response and should execute earlier than the latter filter.
Fixes #8236
2018-08-10 10:39:13 -07:00
Kristian Hellang
da1189e6f1
Use StatusCodes constants instead of literals in the ProducesResponseType code fix ( #8234 )
...
* Use StatusCodes constants instead of literals
2018-08-08 14:41:30 -07:00
Kiran Challa
9585084258
Using Routing feature branch versions
2018-08-07 13:38:36 -07:00
James Newton-King
47f2f451e3
EnableEndpointRouting documentation ( #8220 )
2018-08-07 09:22:33 +12:00
Kiran Challa
c16f86f0ef
React to Routing repo's api changes
2018-08-03 16:25:41 -07:00
James Newton-King
d4472f08ed
Remove legacy EnableGlobalRouting option ( #8214 )
2018-08-04 09:58:00 +12:00
Pranav K
a375cba359
Copy action constraints and EndPointMetadata when setting up a PageActionDescriptor ( #8208 )
...
* Copy action constraints and EndPointMetadata when setting up a PageActionDescriptor
Fixes #8207
2018-08-03 12:04:44 -07:00
James Newton-King
ac410b76d9
Change MvcEndpointInfo to internal ( #8210 )
2018-08-03 16:30:57 +12:00
Pranav K
ce8fc29728
ConsumesAttribute accepts requests without content type
...
Fixes #8174
2018-08-02 16:27:23 -07:00
Pranav K
0989231ed5
Make structs readonly
2018-08-02 15:44:09 -07:00
Pranav K
e2b6f07778
Respect LowercaseUrls in ApiExplorer
...
Fixes #8006
2018-08-02 14:58:41 -07:00
Pranav K
5a20037965
Move API convention analyzers to Microsoft.AspNetCore.Mvc.Api.Analyzers
...
Fixes #8153
2018-08-02 13:53:33 -07:00
Artak Mkrtchyan
6d9aa281c5
Render `maxlength` attribute for an input tag, when MaxLength or StringLength validation attributes are applied to the model class.
2018-08-02 13:44:19 -07:00
Pranav K
b7335ac768
Add a code fix that applies ProducesResponseTypeAttributes
2018-08-02 09:40:18 -07:00
Ryan Nowak
2b289d2f2c
Use MatcherPolicy for Consumes
2018-08-01 19:05:04 -07:00
James Newton-King
44f5b54f5f
React to routing API review ( #8194 )
2018-08-02 13:37:43 +12:00
Pranav K
814a803ed8
Use local instances of MemoryCache in script, link and image tag helper
2018-08-01 10:14:31 -07:00
Kiran Challa
f4ff537a31
Fix flaky test by using a different instance of contract resolver
...
[Fixes #8175 ] FlakyTest: ExecuteAsync_ErrorDuringSerialization_DoesNotCloseTheBrackets
2018-08-01 07:33:37 -07:00
James Newton-King
046af405b6
Rename global routing to endpoint routing ( #8179 )
2018-08-01 15:05:49 +12:00
Pranav K
0726b8b98b
Make publicly exposed Roslyn types internal
2018-07-31 11:08:22 -07:00
Pranav K
ddde149792
Cleanup some IDE warnings
2018-07-30 15:06:43 -07:00
Pranav K
b2a1a7c9de
Ensure parent is a MethodDeclarationSyntax
2018-07-30 14:59:27 -07:00
Pranav K
d346255db6
Add analyzer and codefix that suggests removing unnecessary invalid model state validity checks
...
Fixes #8146
2018-07-30 13:14:20 -07:00
Justin Kotalik
367717760b
Handle subtype with suffix being a subtype without a suffix ( #8170 )
2018-07-30 12:05:41 -07:00
Pranav K
0102d4efab
Introduce ApiConventionMethodAttribute
...
Fixes #8147
2018-07-30 11:13:25 -07:00
Ryan Nowak
fbae57cde1
React to the removal of EndpointConstraint
2018-07-28 19:03:16 -07:00
James Newton-King
c01c7075be
Add EndpointMetadata to ActionDescriptor and hookup CORS ( #8158 )
2018-07-28 16:12:54 +12:00
Doug Bunting
556880872d
Ensure later validations of `null` models do not overwrite `Invalid` state
...
- #8078
2018-07-26 13:49:22 -07:00
Doug Bunting
498fa2d72f
Avoid `InvalidOperationException` when serializing `SerializableError`
...
- #8055
- provide unique name (`<Empty-Key>`) for XML elements that would otherwise be nameless
nits:
- remove now-useless Mono special case in updated test class
- extend updated tests to involve square brackets as well as empty keys
2018-07-26 08:56:02 -07:00
James Newton-King
f31ab716ee
Change MvcEndpointDataSource to use GetChangeToken ( #8137 )
2018-07-26 09:20:26 +12:00
Kiran Challa
10ce77b9ca
Updated MvcEndpointDataSource to create endpoints with SuppressLinkGenerationMetadata
2018-07-25 06:41:57 -07:00
James Newton-King
c08504b08a
MVC startup experience ( #8131 )
2018-07-25 14:30:51 +12:00
Kiran Challa
3df34dbbfe
React to Routing repo's LinkGenerator api changes
2018-07-24 05:20:53 -07:00
Alexej Timonin
52c1e942c6
Added UseCamelCasing and UseMemberCasing extension methods to MvcJsonOptions ( #7256 )
2018-07-23 10:11:04 -07:00
Ryan Nowak
196e3f109f
React to Routing branding
...
This is a reaction PR for the branding changes in progress in Routing.
This can be merged after the changes to in to Routing.
2018-07-22 19:47:15 -07:00
kishan.anem
c0ba374549
Custom error messages with validation message tag helper #8035
...
#8035
PR #8087
https://github.com/aspnet/Razor/issues/2497
2018-07-22 17:55:06 +05:30
Remco
28c0c4d128
Add ability to override the testing web content root using environment variables
2018-07-20 16:56:24 -07:00
Alexej Timonin
d4beab5d09
CompositeValidationAttribute
...
- Add abstract CompositeValidationAttribute.
- Change DataAnnotationsMetadataProvider.CreateValidationMetadata to
populate ValidatorMetadata with validation attributes from CompositeValidationAttribute.
2018-07-20 15:31:14 -07:00
Ryan Nowak
5c488bf09c
make feature branch build
2018-07-20 12:57:43 -07:00
Ryan Nowak
3ba6f35495
React to RoutePattern changes in Routing
2018-07-20 12:57:43 -07:00
Kristian Hellang
53930af0e3
Set ProblemDetails status field during ObjectResult formatting
2018-07-19 17:57:55 -07:00
James Newton-King
ec8976ffaf
Update MvcEndpointDataSource on raised change token ( #8108 )
2018-07-19 16:43:24 +12:00
James Newton-King
badbcb9437
Add MvcEndpointDataSource benchmarks ( #8104 )
2018-07-18 15:48:18 +12:00
Kiran Challa
0caacb8217
React to LinkGenerator api changes
2018-07-17 05:24:27 -07:00
James Newton-King
42218d5fb5
Versioning with endpoint constraint ( #8098 )
2018-07-17 16:37:45 +12:00
Pranav K
b62499e02c
Ensure PageContext.ViewData and ViewContext.ViewData are the same instance
...
Fixes #7675
2018-07-16 11:16:03 -07:00
Pranav K
9d951325b2
Re-organize shared src packages so we can do true IVT between src assemblies
2018-07-16 11:15:58 -07:00
Doug Bunting
35fad0881b
Mark unused `ParameterBinder.BindModelAsync(...)` overloads as `[Obsolete]`
...
- #7660
- also addresses part of #7317 , only in `ComplexTypeModelBinderIntegrationTest`
2018-07-13 13:26:56 -07:00
Doug Bunting
f2608c2ff4
Do not suppress `ModelValidationState.Invalid` entries
...
- #7992 , #7963
2018-07-13 13:21:43 -07:00
Pranav K
dfbdb37979
Refactorings for codefix ( #8067 )
...
* Refactorings for codefix
- Move some common code in SymbolApiResponseMetadataProvider
- Don't run diagnostics for 1006 if we are unable to parse a return type
2018-07-13 13:05:49 -07:00
James Newton-King
f12f9b46ed
Add startup filter to set MiddlewareFilterBuilder.ApplicationBuilder
2018-07-13 12:23:30 +12:00
Hao Kung
a5083d525b
Fix regression with Authorize + IPolicyProvider ( #8068 )
2018-07-12 15:36:03 -07:00
Pranav K
46189abda7
Refactoring for ApiConvention analyzers
2018-07-12 14:26:27 -07:00
James Newton-King
a67d9363e2
Consumes endpoint constraint ( #8057 )
2018-07-12 16:35:33 +12:00
James Newton-King
183ecd85d6
Fix MVC integration with UseEndpoint ( #8047 )
2018-07-11 11:47:33 +12:00
Pranav K
1e7be641ae
Add some common aliases for conventions
...
Fixes #8015
2018-07-09 18:25:29 -07:00
Kiran Challa
0812279464
Merge branch 'release/2.1' into kichalla/21.to.22.mergecommit
...
# Conflicts:
# build/dependencies.props
# korebuild-lock.txt
# src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs
# test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ApiBehaviorApplicationModelProviderTest.cs
# version.props
2018-07-09 13:00:10 -07:00
Kiran Challa
bd995d4cb1
[ Fixes #7959 ] Conventional routing with custom templates not working when you have area attributes
2018-07-09 12:35:14 -07:00
Alexej Timonin
dc2ae93c3f
Add fallback attribute to partial tag helper.
...
Addresses #7515
2018-07-09 12:24:26 -07:00
hishamco
dee479fda7
Add partial helper to Razor Page \ PageModel
...
Fixes #7885
2018-07-09 11:01:15 -07:00
Pranav K
d2bb674b0a
Add support for default response ( #8028 )
...
* Add support for default response
Fixes #6828
2018-07-06 16:44:07 -07:00
Pranav K
335500ab0e
Use ModelMetadata from actual types for validation
...
Fixes https://github.com/aspnet/Mvc/issues/7952
2018-07-02 11:23:16 -07:00
Alexej Timonin
c2fcfabdf3
Add optional property to PartialTagHelper ( #7991 )
...
* Add optional to PartialTagHelper
Addresses #7268
2018-06-29 16:02:38 -07:00
Zbginiew Dobras
f6befb9ed3
Added ObjectResult implementation for Unauthorized response
2018-06-29 14:27:34 -07:00
Nathanael Marchand
133d49c57e
Fix Api Explorer not returning type with ActionResult<T> and no type in ProducesResponseTypeAttribute
2018-06-29 13:55:30 -07:00
Pranav K
7f2a64e32b
Razor runtime compilation produces errors if running on a shared runtime that's rolled forward
...
Do not provide compilation references from runtime MVC assemblies. This avoids cases where the app is compiled
against an older MVC but running against a newer one (e.g. shared fx roll forward) resulting in compiling against multiple
versions of MVC assemblies
Fixes #7969
2018-06-29 13:55:22 -07:00
Nathanael Marchand
82f7f2aab8
Fix Api Explorer not returning type with ActionResult<T> and no type in ProducesResponseTypeAttribute
2018-06-29 12:00:16 -07:00
Pranav K
c4d5ef94a9
Razor runtime compilation produces errors if running on a shared runtime that's rolled forward
...
Do not provide compilation references from runtime MVC assemblies. This avoids cases where the app is compiled
against an older MVC but running against a newer one (e.g. shared fx roll forward) resulting in compiling against multiple
versions of MVC assemblies
Fixes #7969
2018-06-29 11:17:25 -07:00
Kiran Challa
54c14b8782
Reacting to Routing repo's EndpointFinder changes
2018-06-28 12:40:04 -07:00
Doug Bunting
4dd4e5ef3e
Shorten names so MVC repo can be cloned on Windows benchmarks server
2018-06-27 14:33:31 -07:00
kishanAnem
e1af5b8b6d
Array or List in query string does not get parsed #7712 ( #7967 )
...
- exclude collections when detecting complex types in `ApiBehaviorApplicationModelProvider`
- add test cases
2018-06-26 11:43:46 -07:00
Pranav K
94a7c83998
Change DefaultApiConventions ( #7939 )
...
* Change DefaultApiConventions
* Introduce attributes for matching by name and type.
* Move discovery of ApiConventionAttribute to ApiBehaviorApplicationModelProvider. This is required
for us to detect during startup if the convention is incorrectly authored.
2018-06-25 08:24:30 -07:00
Pranav K
6911e192e4
Add IsRequired and DefaultValue to ApiParameterDescription
2018-06-22 06:51:58 -07:00
Pranav K
17d2545b55
Throw if the type parameter for ActionResult<T> is an action result ( #7942 )
...
Fixes #7931
2018-06-21 07:51:12 -07:00
N. Taylor Mullen
2599e0f5cc
Fix up a few pieces for the fallback integrity check feature.
...
- Regenerated test baselines.
- Update code styling in TagHelpers.
- Modified some comments for clarity.
- Renamed fallback integrity attribute for both script and link tags.
#7845
2018-06-20 16:10:52 -07:00
jmhmaine
8a77ed23d3
Added support for ignoring integrity attribute on fallback for the Link TagHelper
...
- Do not include integrity attribute when asp-fallback-intergrity-check is false
- Added Unit Tests, manual tests
Addresses #7845
2018-06-20 16:10:52 -07:00
Pranav K
4f7e849cc1
Setting up for ApiConventionAttribute analyzers ( #7912 )
...
* Setting up for ApiConventionAttribute analyzers
2018-06-20 15:22:53 -07:00
Pranav K
e7ab81fe0b
Ensure analyzer package is referenced by Microsoft.AspNetCore.Mvc
...
Fixes #7684
2018-06-19 16:11:47 -07:00
James Newton-King
3547341762
Add support for conventional routes with dispatching ( #7928 )
2018-06-20 09:02:52 +12:00
Kiran Challa
a0a9c2c585
Integrate Dispatcher's link generator
...
Related to https://github.com/aspnet/Routing/issues/530
2018-06-19 04:14:05 -07:00
Pranav K
a712ccc98a
Fix up error message when compilation references are missing
2018-06-18 09:20:08 -07:00
Kiran Challa
6df28ef09a
Reach to Dispatcher changes and fix build break
2018-06-15 09:30:07 -07:00
Ryan Brandenburg
7eac72ae46
Set 2.1 baselines
2018-06-14 11:09:28 -07:00
Ryan Brandenburg
78fc49ba0c
Set 2.1 baselines
2018-06-14 11:09:19 -07:00
James Newton-King
a7406d4497
Add MvcEndpointDataSource and functional tests ( #7886 )
2018-06-14 11:03:45 +12:00
Pranav K
287a3c5e69
Allow IgnoreAntiForgeryToken applied on Razor Page models to work
...
Fixes #7795
2018-06-13 11:59:47 -07:00
Pranav K
6c2ef122f8
Add support for conventions in DefaultApiDescriptionProvider
2018-06-11 16:07:09 -07:00
Brecht Carlier
203258d00e
Update AnchorTagHelper.cs
...
Fixed incorrect documentation
2018-06-08 15:13:28 -07:00
Pranav K
c29527f992
Add some assertions for controllers and controller actions
2018-06-08 15:00:19 -07:00
Pranav K
f2eb6f8d37
Add some tests for CodeAnalysisExtensions
2018-06-08 14:58:29 -07:00
Ryan Brandenburg
b7064c576d
Use templates for VSTS builds
2018-06-07 12:37:01 -07:00
Nate McMaster
672c794335
Add certificate names for code signing
2018-06-05 22:34:04 -07:00
Pranav K
592ed3b4f5
Create an analyzer to warn users not to decorate filters on page handler methods
...
Fixes #7684
2018-06-05 17:23:30 -07:00
Pranav K
f0c552ee49
Fixup DebuggerDisplay for PageActionDescriptor
2018-05-31 13:47:39 -07:00
Kiran Challa
2d63669695
[ Fixes #7609 ] ApiBehaviorApplicationModelProvider overwrites existing BindingInfo in entirety when inferring binding sources
2018-05-30 05:30:10 -07:00
Pranav K
984cd46c4d
Fix ActionMethodExecutor incorrectly setting DeclaredType on ObjectResult
...
Fixes #7782
2018-05-29 14:35:42 -07:00
Pranav K
8e31319215
Prevent null refs in some simple cases in CachedExpressionCompiler
...
Fixes #6928
2018-05-29 11:09:48 -07:00
Ryan Brandenburg
edf4e8fd9e
DataAnnotations of Enum values use DataAnnotationLocalizerProvider
2018-05-25 16:00:00 -07:00
Kiran Challa
418aac57f4
[ Fixes #7609 ] ApiBehaviorApplicationModelProvider overwrites existing BindingInfo in entirety when inferring binding sources
2018-05-24 14:28:42 -07:00
Pranav K
49c653ed0b
Infer BindingSource.FormFile for IEnumerable<IFormFile>
...
Fixes #7770
2018-05-22 11:05:09 -07:00
Nisha Kaushik
077b1d87a9
#7024 Request: ServiceBasedPageModelActivatorProvider [Review Changes]
2018-05-22 10:23:08 -07:00
Nisha Kaushik
0c795c4f33
#7024 Request: ServiceBasedPageModelActivatorProvider
2018-05-22 10:23:08 -07:00
Pranav K
e1eaf6a6e0
Cleanup TestCommon
2018-05-18 10:45:57 -07:00
Pranav K
624a5ed522
Fix ActionMethodExecutor incorrectly setting DeclaredType on ObjectResult
...
Fixes #7782
2018-05-18 10:43:28 -07:00
Pavel Krymets
a736441ca5
Enable analyzers ( #7789 )
2018-05-18 10:26:42 -07:00
Kiran Challa
4472c00c6f
PR feedback fixes for logging requestpredicate shortcircuit logging
2018-05-17 11:17:29 -07:00
Kiran Challa
d80471ad15
Added logging to model binding requestpredicate shortcircuit
2018-05-15 14:13:03 -07:00
Sébastien Ros
19d82928ba
Making Razor compilation cache replaceable ( #7780 )
2018-05-15 11:36:47 -07:00
Pranav K
d9f035ad7c
CacheTagHelper should be able to vary by culture
...
Fixes #3398
2018-05-13 14:21:08 -07:00
Pranav K
1ca6ce3377
setupAction parameter in MvcLocalizationServices.AddLocalizationServices is never used
...
Fixes #7761
2018-05-09 18:12:15 -07:00
Pranav K
504da3c565
Cleanup CachedExpressionCompiler
2018-05-08 15:34:38 -07:00
Pranav K
bda5ea9df0
Cleanup BindingInfo \ ModelMetadata coalescing in ModelBinderFactory
...
Fixes #7583
2018-05-08 10:24:18 -07:00
Pranav K
26454fb1da
Add ViewComponentResult helper methods to Page \ PageModel
...
Fixes #7051
2018-05-07 16:35:29 -07:00
Pranav K
dfd9b17f68
More keynotfound avoidance
2018-05-07 11:08:41 -07:00
Pranav K
f35deb71f9
Prevent KeyNotFound when logging
2018-05-07 10:50:26 -07:00
Jass Bagga
e0188c4936
Modify info level logging for pages ( #7733 )
...
Addresses #7602
2018-05-04 13:47:48 -07:00
Pranav K
777782ac6e
Test cleanup
2018-05-03 16:03:42 -07:00
Kiran Challa
19c41c0494
Revert "[ Fixes #6902 ] Added an overload for StatusCode that takes in System.Net.HttpStatusCode"
...
This reverts commit c567a690bc .
[Fixes #7709 ] Revert https://github.com/aspnet/Mvc/pull/6902
2018-05-01 13:27:57 -07:00
Ajay Bhargav Baaskaran
595e83d0eb
Added nuspec file to Mvc.Analyzers assembly
2018-04-20 14:53:46 -07:00
Pranav K
5d5222cdd8
Introduce BindPropertiesAttribute
...
* Allow controller and Razor Page models to be annotated with BindPropertiesAttribute
* Disallow BindPropertyAttribute from being declared on types.
* Do not allow arbitrary binding attributes to be applied to Razor Page models.
Fixes #7686
2018-04-20 14:32:14 -07:00
Ajay Bhargav Baaskaran
44e282e8d4
Generate symbols.nupkg for Mvc.Razor
2018-04-19 12:32:36 -07:00
Pranav K
60a9810268
Allow PartialTagHelper to specify a null model. Fixes #7667
2018-04-18 14:16:44 -07:00
Kiran Challa
faca3da42f
Ensure ViewData is set on PageResult after a handler method executes
...
[Fixes #7665 ] Initializing PageResult.Page as part of result execution breaks Identity UI
2018-04-18 11:44:04 -07:00
Kiran Challa
4f7d53f4e7
[ Fixes #7658 ] FileStreamResultExecutor fails to Dispose FileStream
2018-04-18 11:43:09 -07:00
Kiran Challa
6e4bd1eb46
Fixed PageFilter docs
2018-04-18 11:42:40 -07:00
Javier Calvarro Nelson
1cede88f26
[ Fixes #7656 ] Deps file for netstandard2.0 targeting projects copied by Microsoft.AspNetCore.Mvc.Testing does not play well with Mvc
2018-04-18 11:03:52 -07:00
Javier Calvarro Nelson
e781cd38cf
[ Fixes #7635 ] Provide a way to configure HTTP Client instances
2018-04-17 12:52:56 -07:00
Javier Calvarro Nelson
e0b4c13895
[ Fixes #7587 ] Default to Development environment in tests
2018-04-17 12:52:51 -07:00
Doug Bunting
e0e96ce53b
Include parameter type's attributes in ModelMetadata
...
- #7595
- #7595 relates to #7350 but does not have the same root cause
- did _not_ revert the src changes in #7350 fix (d995b0418a )
- make non-`[Obsolete]` `ModelAttributes` constructor overload `internal`
- should generally use `static` methods and not any constructor
- change some unit tests to use `[Obsolete]` constructor overloads (with suppressions)
- fix test `ParameterBinderExtensions` to use current `ParameterBinder.BindModelAsync(...)` overload
- found some tests updated `IModelMetadataProvider`, `MvcOptions`, etc. instances but didn't register them in DI
- extend `ModelBindingTestHelper` and `ModelBindingTestContext`
- reorder some tests to use correct `MvcOptions` and `IModelMetadataProvider` everywhere
- fixes above issues
nits:
- take a few VS suggestions
- remove an old comment indended only for PR "Reviewers:"
2018-04-17 12:40:38 -07:00
Pranav K
d8fc2d4009
Fix test failures
...
* Disable deps file generation in class library project. This workarounds known issue - https://github.com/dotnet/core-setup/issues/3726
* Update RazorProjectRouteModelProvider to not specify a trailing slash. This produces paths with a single slash as opposed to two slashes messing with route creation.
* React to Microsoft.AspNetCore.Mvc.Razor.Extensions.Reference that shows up in the deps file.
2018-04-15 16:31:41 -07:00
Doug Bunting
cc5ae02b7d
Fix binding & validating dictionaries of non-simple types in jQuery requests
...
- #7423
- retry failed inner bindings with alternate syntax in `ModelStateDictionary`
- use property syntax if first attempt tried index syntax and visa versa
- instantiate `ShortFormDictionaryValidationStrategy` with full `ModelState` keys
- can now provide exact `ModelState` keys that `ModelStateDictionary` used in inner bindings
- normalize model names without a leading period in `JQueryKeyValuePairNormalizer`
nits:
- take a few VS suggestions
2018-04-14 10:41:00 -07:00
Javier Calvarro Nelson
4984dd2cdd
Revert "[ Fixes #7587 ] No easy way to change ASPNETCORE_ENVIRONMENT"
...
This reverts commit 22510e1377 .
2018-04-13 16:51:25 -07:00
Javier Calvarro Nelson
86a036cf76
Revert "[ Fixes #7635 ] Provide a way to configure clients in WebApplicationFactory"
...
This reverts commit 1e26571ba6 .
2018-04-13 16:50:38 -07:00
Javier Calvarro Nelson
1e26571ba6
[ Fixes #7635 ] Provide a way to configure clients in WebApplicationFactory
2018-04-13 16:02:56 -07:00
Javier Calvarro Nelson
22510e1377
[ Fixes #7587 ] No easy way to change ASPNETCORE_ENVIRONMENT
2018-04-13 16:02:56 -07:00