Commit Graph

2588 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran 028c0fb131 Enabled xml doc generation 2016-02-24 12:19:46 -08:00
Pranav K 0bf650a789 Use a fixed version of Roslyn to allow Coherence to succeed 2016-02-24 10:48:18 -08:00
Doug Bunting d1695ea6d6 Update `build.sh` to match other repos
- currently attempts to `source KoreBuild.sh`
2016-02-24 09:38:40 -08:00
Caleb Nelton 5b0b0b95a7 Small Refactorings
Use nameof
Replace with single call to SingleOrDefault
Replace with single call to FirstOrDefault
Simplify conditionals
2016-02-23 19:01:09 -08:00
Pranav K 80b6996701 * Moving DNX dependencies to test only
* Updating Mvc tests to use dotnet test to run on dnxcore50
2016-02-23 18:58:42 -08:00
Sebastien Ros c259f82615 [Fixes #4112 #4093] Adding support for custom SSL port
New optional MvcOptions.SslPort. If not defined the redirection uses an empty port (default),
otherwise the custom port is used.
2016-02-23 10:21:11 -08:00
Pranav K 5b805bb12d Updating to use cli
Fixes #3908
2016-02-22 17:49:51 -08:00
Kiran Challa 779edb6fe1 React to Routing service collection extension changes 2016-02-22 11:43:08 -08:00
Ajay Bhargav Baaskaran df5eb0a15c [Fixes #4092] Using System.Buffers in JsonResultExecutor 2016-02-19 16:45:26 -08:00
N. Taylor Mullen b39f4dfe29 React to razor tooling rename. 2016-02-19 15:05:37 -08:00
Kiran Challa 4123d83d26 [Fixes #4047] SelectTagHelpers: asp-items shouldn't require/depend on asp-for. 2016-02-19 10:03:45 -08:00
Kiran Challa fd3ee49987 [Fixes #4085] Controller helper inconsistency: HttpNotFound(), Ok() 2016-02-19 09:25:04 -08:00
matt kocaj 75c05be2f7 removing redundant 'http' prefixes from helper methods. 2016-02-19 09:25:03 -08:00
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
Ajay Bhargav Baaskaran fd6d28d9eb Make AddControllersAsServices not overwrite existing IControllerTypeProvider 2016-02-17 10:14:31 -08:00
jacalvar 910f0139f9 [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
Kiran Challa 7337f50112 [Fixes #3774] DataAnnotation validation ignored 2016-02-16 08:52:50 -08:00
jacalvar ac23e5aec6 [Fixes #4013] Added support for areas in 'a' and 'form' tag helpers 2016-02-12 17:08:17 -08:00
jacalvar 65858b8d8b [Fixes #4051] Split OutputFormatter into OutputFormatter and TextOutputFormatter 2016-02-12 12:04:18 -08:00
jacalvar 63354e25a8 Make GetSupportedContentTypes on InputFormatter vitual 2016-02-12 10:57:36 -08:00
Ben Adams a33369acd8 Fast-path PrefixEnumerator 2016-02-12 09:06:14 -08:00
Ben Adams a493a9756e Simplify IsWhitespace 2016-02-10 17:34:20 -08:00
Ben Adams fd11d70fcd Less work on non-relative strings in UrlResolutionTagHelper 2016-02-10 17:34:19 -08:00
N. Taylor Mullen dca15c0a60 React to https://github.com/aspnet/Razor/pull/683 2016-02-10 16:53:33 -08:00
Ben Adams 6c2c777bdc Optimize StartsWithPrefix
-Remove double "equality" test in StartsWithPrefix
-Further StartsWithPrefix efficiencies
-Remove subkey allocation in StartsWithPrefix
2016-02-10 10:12:35 -08:00
Ryan Nowak dacebacb90 Optimize PrefixContainer
There's really no need for us to sanitize null. This code handles null
correctly. Additionally, CopyTo should be able to do better than our
hand-written foreach in the worst case, and avoids an enumerator
allocation.

Removed a custom implementation of IndexOfAny.
2016-02-10 09:48:29 -08:00
Ryan Nowak 698502df8c Rewrite MutableObjectModelBinder
A rewrite focused on simplifying extensibility points and reducing
allocations.
2016-02-10 09:48:05 -08:00
Chris R fa9f13db2d React to MediaTypeHeaderValue.Parse exception message change. 2016-02-08 22:26:55 -08:00
Chris R 4f8d1863d8 React to ISendFileFeature parameter name change. 2016-02-08 11:53:57 -08:00
Ryan Nowak 44834debeb Fix broken code path in antiforgery 2016-02-08 10:51:33 -08:00
Pranav K 7d1d7bc19c Reacting to CoreCLR package version changes 2016-02-08 09:33:48 -08:00
N. Taylor Mullen d20df7393d Fix project.json System.Runtime dependency. 2016-02-05 18:22:51 -08:00
N. Taylor Mullen f957c04c24 Update project.json to remove redundant System.Runtime dependency.
- This package is pulled in transitively.
2016-02-05 17:23:34 -08:00
jacalvar fe639f028f [Fixes 3961] Consider InputFormatter behavior when we can't read the charset
* Broken InputFormatter into InputFormatter and TextInputFormatter
* Added an exception to ModelState inside ReadAsync on TextInputFormatter
  when we can't find a valid encoding to read the body.
2016-02-05 10:42:36 -08:00
Ajay Bhargav Baaskaran 8e8de413f8 Re-enable few tests on Mono 2016-02-04 16:53:09 -08:00
N. Taylor Mullen 59334dcf17 React to aspnet/Razor#604 2016-02-04 16:37:30 -08:00
Ryan Nowak 9ea5a939cf Move Antiforgery.GetHtml() to MVC as an extension 2016-02-04 13:08:38 -08:00
Ryan Nowak 063bc1f8e8 Replace comparer with a bespoke BinarySearch 2016-02-04 11:25:34 -08:00
jacalvar 1a87f6d91a [Fixes #3915] Update FormFileModelBinder to avoid re-parsing the ContentDisposition header 2016-02-04 11:17:11 -08:00
ryanbrandenburg 477e620a6b * Unignore test 2016-02-03 12:03:03 -08:00
Ajay Bhargav Baaskaran 6de171f1ef [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
N. Taylor Mullen acd88d08ba Enable invoking a `ViewComponent` without arguments inside of a controller.
- Also updated doc comments to properly reflect `ViewComponent` `arguments` parameter.
2016-02-03 10:30:02 -08:00
Kiran Challa f888ced1f2 Updated FormatFilter tests to include Accept header 2016-02-03 09:29:57 -08:00
Kiran Challa bf93c7d7a4 Removed JavaScriptEncoder property from HtmlHelper 2016-02-02 16:52:13 -08:00
N. Taylor Mullen d97fe04cd7 Fix Mvc tests. 2016-02-02 16:03:08 -08:00
N. Taylor Mullen 096007b394 Updated `Controller`s `ViewComponent` method to handle arguments.
- This bit was missed when changing the `ViewComponent` invocation pattern resulting in the inability to invoke `ViewComponent`s with arguments in a `Controller`.

#4004
2016-02-02 15:42:23 -08:00
Cesar Blum Silveira 50fc0bb140 Reference Microsoft.NETCore.Platforms where necessary. 2016-02-02 14:22:07 -08:00
Louis DeJardin c116a38c87 Reducing ModelBindingContext allocations
Closes #4007, Fixes #3622, Fixes #3621

Squashed commit of the following:

commit 4b3095671d945ae79baa4fc4ba22a2ce5ebe488e
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 15:05:58 2016 -0800

    PR Feedback #4007

    ModelBindingContext.ModelType. Need similar changes a couple of
    other places in this class.

commit 7c45847d1d4c3eb02c48710bb4f100d4d1305385
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 15:01:13 2016 -0800

    PR Feedback #4007

    Please clean out the now-extra added usings for System.Diagnostics.

commit 13263fb29a0a12b472eab130eafe6760f6279262
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 14:58:52 2016 -0800

    PR Feedback #4007

    Confusing to read: How can overallResult be non-null here?

commit dfb52e1bd48397580eacf87be3541b159dbe79f1
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 14:47:28 2016 -0800

    PR Feedback #4007

    End these new guys with a period.

commit f4c745a0a805b960234cd4d810378bc40b8e5c8c
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 14:44:10 2016 -0800

    Fixing unit tests

    Also fixes rebase error in CancellationTokenModelBinder

commit f3874cc27388552e863d99d8e6631a2901f8e000
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 13:01:02 2016 -0800

    PR Feedback #4007

    Remove commented-out code.

commit 44ec1a5a3bd4fdeb4d1c4de9f0b402ff0fd34ffe
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 12:22:04 2016 -0800

    PR Feedback #4007

    Why now public?

commit 9aa45eda42ec9b11b7e6b73a14e887f1be8cb130
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Mon Feb 1 12:18:19 2016 -0800

    PR Feedback #4007

    Leave out .Test

commit 58d32d809797d25cc9b5b4c0516ae9e5992fa66e
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 15:41:14 2016 -0800

    PR Feedback #4007

    By making this async, we've undone an optimization here.
    Notice BindModelAync now has a state machine.

commit f7503228b77803b786c19e06e60f618f6f5e15c5
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 15:30:54 2016 -0800

    PR Feedback #4007

    Don't need extra line

commit cf26f3e5125792d6af0ca2afda672e241fe0e164
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 15:28:23 2016 -0800

    PR Feedback #4007

    No longer need most of the using System.Diagnostics additions

commit e90c40c4e4315462efc9ade1585e2e8c085588a4
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 15:12:50 2016 -0800

    PR Feedback #4007

    Suggest Microsoft.AspNetCore.Mvc.Internal.

commit 5360599e9c09ab97b8136977ee0917fd88f51f76
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 14:57:28 2016 -0800

    PR Feedback #4007

    Remove this line.

commit ce63edba51721412684a54886109e6b2225c6c99
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 14:14:02 2016 -0800

    PR Feedback #4007

    incorrect mentions of DefaultModelBindingContext in doc comments

commit bbc738ca2304243839e8d68615ff4bbf14f3279c
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 13:59:50 2016 -0800

    PR Feedback #4007

    Could we convert most of these setups to avoid the
    "async but not await" mess?

commit 0827e6917481e3fafb2905a3fa93cf90afb9be40
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Fri Jan 29 11:02:00 2016 -0800

    PR Feedback #4007

    remove the file

commit 3dd0d10d7f16c94df5f6d34ecb5f2efda62bccd8
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 13:34:31 2016 -0800

    Revert "PR Feedback"

    This reverts commit 589d3e65d406b127a0b833d86c05ad4a8c5172c8.

    It seems the assignment of these properties is not appropriate
    in both cases.

commit c8a97ada63fa16ee7df6c165031bf15b1c23e8a2
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 12:37:18 2016 -0800

    PR Feedback

    DefaultModelBindingContext should not be in Abstractions

commit 5e3b6a1486283f45867830693d4fd23cc967f06f
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 12:35:28 2016 -0800

    PR Feedback

    Is it still needed and, if so, where does the problem lie?

commit 44635a75af05034863f0d4b80b2eb857d43766b2
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 11:06:26 2016 -0800

    PR Feedback

    * this is either supported (shouldn't assert) or not supported (should throw). I don't feel like these asserts add much value
    * this isn't something that should throw

commit 648975cad14ac5e3738ea454c490ca221f650155
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 10:54:28 2016 -0800

    PR Feedback

    remove the other static constructors for Task<ModelBindingResult>
    they don't have a purpose anymore

commit d0e15211530668ec21406121342715b0d0f606a6
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 10:51:24 2016 -0800

    PR Feedback

    the reason for the separation was to put the implementation somewhere else

commit 2caf88df7a37664db829d660cbb5266cf6871f2c
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 10:48:25 2016 -0800

    PR Feedback

    * coding standards...
    * yea
    * private readonly

commit 6c2c640611686a554a8c417a407fe169c45a690e
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 10:46:12 2016 -0800

    PR Feedback

    * disposable -> <see cref="ModelBindingContextDisposable"/>
    * Fill in the blanks.

commit df07891c798627ac9c8fce6a7598d9386e979615
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 10:44:07 2016 -0800

    PR Feedback

    Value to assign to the ... for modelName and model as well.

commit 8e9ade7378577eddc0ba8e939deafe8d12781b8a
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 28 10:43:50 2016 -0800

    PR Feedback

    Should this just be an abstract class rather than an interface?

commit a66685e2470a84b0acbf4e797eff5010a1a066ab
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 23:47:44 2016 -0800

    PR Feedback

    Suggest resetting FallbackToEmptyPrefix for current context as part
    of PushContext().

commit d85e66f59d24e0959652f1683cb94c4b513d75c0
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 23:34:42 2016 -0800

    PR Feedback

    Add a using for the Internal namespace.

commit bef09536f881d400f15a83b7788c828903679a38
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 23:27:30 2016 -0800

    PR Feedback

    needs lots of /// doc love and blank lines

commit 4173488112f2889d662d5a7c55f249aefa821c22
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 23:06:49 2016 -0800

    PR Feedback

    Temp file accidentally added. Oops.

commit 6790d6104d5bd72ce7eab270bfe9a360cacf74f2
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 23:04:40 2016 -0800

    PR Feedback

    please remove the else bits after returns

commit 8d077ee27109133d18c5cddfe3b9b6c6e9a40e0e
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 22:57:38 2016 -0800

    PR Feedback

    The code at one point matched the comment -- always returning
    something other than NoResult. Likely the comment needs
    to change.

commit 0ea6c2186212444f46c7a48394b86b14190a9026
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 22:50:02 2016 -0800

    PR Feedback

    Don't recall why this was virtual but why remove that?

commit 0b27f3e62df6836e6e8751967c47c6192c3eec9a
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 22:35:57 2016 -0800

    PR Feedback

    No need for this line; just asserted that Result is already null.

commit c85648bb680bdbdb33381cd1af91133d04d56592
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 22:34:26 2016 -0800

    PR Feedback

    Comment needs some love since NoResult is no more.

commit a606cf32386de9e4566a678b34a195cc0720211a
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 22:18:55 2016 -0800

    PR Feedback

    * Long enough to start wrapping this. Same for a few other properties
      in this class.
    * Why is this check debug-only?
    * /// docs and some blank lines between members

commit 7efce5675a78350a4a7fde4b54fcb7886fe18252
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 20:29:50 2016 -0800

    PR Feedback

    Why not use the Task helper used elsewhere?

commit eb5fe6f95a463eb2f162f51649ffea57db87e286
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 20:28:31 2016 -0800

    PR Feedback

    Sort usings

commit df3bd00c4b59d2434e3a7be28e637d3c8008ae32
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 20:27:38 2016 -0800

    PR Feedback

    Dead code

commit fe7ec17fbb5209f2904f067ec1f91169ab05fb33
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 20:26:04 2016 -0800

    PR Feedback

    Putting internal back in place

commit 496f1f97ac48b2e95572dd6d463ced3366f8d36c
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 20:21:03 2016 -0800

    PR Feedback

    stylecop 13040: Move these to the top of the file.

commit cd003d0bca6516a907a0ae889d2e6130ff473b57
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Wed Jan 27 19:38:15 2016 -0800

    Renames to asp.net core

commit e1cf523119084e35b70f11f67f64f651c39e1c8b
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Jan 21 21:21:44 2016 -0800

    Removing NoResult and fixing tests

commit 5af6223a4d60b6c4139c1fc62ebf297ab0e5454f
Author: Louis DeJardin <lodejard@microsoft.com>
Date:   Thu Dec 17 11:49:08 2015 -0800

    Reducing ModelBindingContext allocations
2016-02-02 12:10:43 -08:00
ryanbrandenburg 2aca8810d3 * Give message correct path. 2016-02-02 11:08:41 -08:00
Ryan Nowak d1fdc22b9b Reduce allocations in FormContext 2016-02-01 14:27:20 -08:00