aspnetcore/test/Microsoft.AspNetCore.Mvc.Co...
Ryan Nowak b557ca55d9 Fix behavior of StartsWithPrefix
This undoes a behavior change introduced in
7b18d1d3f1.

The intent was to have ClearValidationState do the right thing for a case
where a collection was bound to the empty prefix, and then used again with
TryUpdateModel.

This change was implemented by saying that a key like "[0].Foo" is a match
for the prefix of "Foo". This isn't really right, and it's only
interesting for the ClearValidationState case.

The problem is that we don't know what the keys look like for a
collection. We can assume that they start with [0] but that's not really a
guarantee, it's a guess.

This change fixes the behavior of StartsWithModel, and move the
responsibility for this case back into ClearValidationState.

This change also removes the call to ClearValidationState from
TryUpdateModel. If you need this behavior, then call ClearValidationState
manually. Trying to bind and then re-bind a model object isn't really what
we intend.
2016-02-17 11:16:16 -08:00
..
ApplicationModel
Builder
Controllers Added caching for validators 2016-01-26 17:15:16 -08:00
DependencyInjection
Filters
Formatters [Fixes #4050] Throw an exception on CanRead/Write and GetSupportedContentTypes when the list of media types is empty 2016-02-16 17:16:16 -08:00
Infrastructure [Fixes #4051] Split OutputFormatter into OutputFormatter and TextOutputFormatter 2016-02-12 12:04:18 -08:00
Internal Make AddControllersAsServices not overwrite existing IControllerTypeProvider 2016-02-17 10:14:31 -08:00
ModelBinding Fix behavior of StartsWithPrefix 2016-02-17 11:16:16 -08:00
Properties
Routing
BadRequestObjectResultTests.cs
BadRequestResultTests.cs
BindAttributeTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
ChallengeResultTest.cs
ConsumesAttributeTests.cs React to MediaTypeHeaderValue.Parse exception message change. 2016-02-08 22:26:55 -08:00
ContentResultTest.cs
ControllerBaseTest.cs [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
CreatedAtActionResultTests.cs
CreatedAtRouteResultTests.cs
CreatedResultTests.cs
EmptyResultTests.cs
FileContentResultTest.cs
FileResultTest.cs
FileStreamResultTest.cs
FlushReportingStream.cs
ForbidResultTest.cs
HttpNotFoundObjectResultTest.cs
HttpNotFoundResultTests.cs
HttpOkObjectResultTest.cs
HttpOkResultTest.cs
HttpStatusCodeResultTests.cs
HttpUnauthorizedResultTests.cs
LocalRedirectResultTest.cs
MediaTypeCollectionTest.cs
Microsoft.AspNetCore.Mvc.Core.Test.xproj
MvcOptionsTest.cs
NonDisposableStreamTest.cs
ObjectResultTests.cs
PhysicalFileResultTest.cs
ProducesAttributeTests.cs React to MediaTypeHeaderValue.Parse exception message change. 2016-02-08 22:26:55 -08:00
RedirectResultTest.cs
RedirectToActionResultTest.cs
RedirectToRouteResultTest.cs
RequireHttpsAttributeTests.cs Remove OSx+Mono skips related to aspnet/External#50 2016-01-30 22:51:48 -08:00
ResponseCacheAttributeTest.cs
SerializableErrorTests.cs
TestBufferingFeature.cs
VirtualFileResultTest.cs
project.json Reference Microsoft.NETCore.Platforms where necessary. 2016-02-02 14:22:07 -08:00