jacalvar
4b5df98bc3
[ Fixes #4224 ] Remove use of service locator on ViewExecutor
2016-05-31 23:39:22 -07:00
jacalvar
6a6d2e0d9f
[ Fixes #4506 ] Move and rename ActionDescriptor.Name to ControllerActionDescriptor.ActionName
2016-05-31 23:13:20 -07:00
jacalvar
5f4ca4fa66
[ Fixes #4223 ] Added a facade for ViewComponentResult
2016-05-31 22:47:33 -07:00
jacalvar
8493064fe5
[ Fixes #4207 ] Review IActionResult classes and add facades as necessary.
...
* Moved FileResults to use executor façades
* Changed redirect result types to use executor façades.
2016-05-31 22:46:18 -07:00
Ajay Bhargav Baaskaran
283573d6c9
[ Fixes #4291 ] Simplified MvcRouteHandler code
2016-05-31 15:02:14 -07:00
Hao Kung
c7a46e4caf
AuthPolicy should use IPolicyProvider
2016-05-31 13:47:58 -07:00
Doug Bunting
e63f094a5f
Use type metadata for `ModelBinderProviderContext.BindingInfo`
...
- #4652
- previously ignored for top-level models
- `ModelBinderProviderContext.BindingInfo` is now never `null`
- similarly, use type metadata (as well as parameter info) for `ModelBindingContext.BinderModelName`
- previously ignored when overridden in `ControllerArgumentBinder`
2016-05-27 23:00:29 -07:00
N. Taylor Mullen
cfd58f1747
React to aspnet/Razor#705
...
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags.
- Removed `TagHelperOutputExtensions`. It's no longer needed.
- We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes.
- Updated tests.
2016-05-27 12:00:01 -07:00
John Luo
5eed7b9b88
React to updated CoreCLR packages
...
https://github.com/aspnet/Coherence/issues/97
2016-05-26 18:31:05 -07:00
Pranav K
bb226aef6b
Update Mvc.Core and dependencies to netstandard1.6
2016-05-26 16:52:04 -07:00
Michiel Post
b6794ab1b7
Fixed null reference on ModelStateDictionary.ChildNodes when calling Clear
2016-05-26 16:12:49 -07:00
Shahriar Gholami
42dd4499e0
Fixed a bug in TagBuilder when attribute value is null
...
#4710
2016-05-26 11:04:32 -07:00
Pranav K
5d72a7f747
Modify ICompilationLibrariesProvider to return a sequence of reference path
...
Fixes #4738
2016-05-25 16:20:23 -07:00
Pranav K
9acd0f578c
Remove IDisposable contract from IMvcRazorHost
...
Fixes #4709
2016-05-25 14:43:12 -07:00
Ajay Bhargav Baaskaran
3d0f436a06
[ Fixes #4294 ] TypeActivate MvcRouteHandler
2016-05-25 12:57:16 -07:00
mnltejaswini
b96851ec20
[Perf] Avoid ViewBuffers for writing bound TagHelper attribute values. Fixes aspnet/Razor#717
2016-05-25 12:14:26 -07:00
Hao Kung
f54a964815
AuthZFilter should call into Service more
2016-05-24 14:42:54 -07:00
Pranav K
15f113ddb1
Remove IControllerTypeProvider
2016-05-24 14:36:02 -07:00
Pranav K
90f0e29923
Inject the IRazorViewEngine directory instead of using GetRequiredService
2016-05-24 10:40:33 -07:00
Pranav K
ab76f743f4
Use dependency context from all application parts when compiling views
...
Fixes #4498
2016-05-24 10:28:51 -07:00
Pranav K
69e029fc79
Update the namespace for Razor generated code to AspNetCore
...
Fixes #4476
2016-05-23 16:25:59 -07:00
Ryan Nowak
d92b3ba2c6
Make ModelBindingContext.Result non-nullable
...
This change simplifies a bunch of code and fits more in line with the
current design of model binding.
Now, a model binder only has to do anything if it was successful.
'return' is enough to indicate failure.
2016-05-23 14:18:34 -07:00
Ryan Nowak
88c9ae6588
Remove Key from ModelBindingResult
2016-05-23 13:17:19 -07:00
jacalvar
230a13d0e1
[ Fixes #4633 ] Datetime? and DateTimeOffset? values on InputTagHelper are not rendered correctly.
2016-05-20 11:29:29 -07:00
jacalvar
ee2a591d2c
[ Fixes #4655 ] Make comparisons in DefaultAssemblyPartDiscoveryProvider case insensitive
2016-05-20 11:22:55 -07:00
jacalvar
a490cf13a6
[ Fixes #4555 ] Assemblies with a transitive dependency to MVC are not included as part of the list of discovered assemblies
2016-05-20 11:18:34 -07:00
jacalvar
b1054a28c7
[ Fixes #4353 ] Cleanup application part discovery
2016-05-20 10:56:03 -07:00
Kiran Challa
93be3dee6e
Fix FormTagHelper to set flag indicating generation of AntiforgeryToken
...
[Fixes #4595 ] Better error message with extraneous @Html.AntiforgeryToken
2016-05-20 04:29:01 -07:00
Kiran Challa
20a2e748ec
Added ValueProviderFactories to ResourceFilterExecutingContext
...
This enables removing value provider factories from model binding(which is needed in some scenarios like large file uploads)
2016-05-20 04:15:07 -07:00
mnltejaswini
df4eb283b2
[Perf] UrlHelper shares a single RouteValueDictionary across several calls to Action and RouteUrl methods
2016-05-19 16:15:46 -07:00
mnltejaswini
d7ccea17ce
[Perf] Refactoring ControllerActionInvoker to avoid coercing action method's return type to Task<object> for simple cases. Fixes #4539
2016-05-19 14:21:29 -07:00
Kiran Challa
f7b2ee80fd
[ Fixes #4550 ] Add an Option to set the Razor view location formats
2016-05-19 14:04:33 -07:00
Pranav K
61883b5101
Fix more schema warnings in Mvc
2016-05-18 18:25:45 -07:00
mnltejaswini
74357b3ed8
[Perf] Fast Generate Url for specific cases to avoid string allocations
2016-05-18 18:08:25 -07:00
Kristian Hellang
0f8542e4b2
Throw a more descriptive exception for missing CORS policies
2016-05-18 17:54:17 -07:00
Ryan Brandenburg
941da9264b
Move ModelBindingHelper to Internal ( #4664 )
2016-05-18 16:52:43 -07:00
Pranav K
78be3ad135
Revert "Update Minor versions ( #4657 )"
...
This reverts commit e731a327cf .
2016-05-18 09:11:20 -07:00
Ryan Brandenburg
e731a327cf
Update Minor versions ( #4657 )
2016-05-17 12:40:20 -07:00
N. Taylor Mullen
55922d68d4
React to `HtmlEncodedString` rename to `HtmlString`.
...
- Removed the Mvc instance of `HtmlString` since it now exists in `HtmlAbstractions`.
#4558
aspnet/HtmlAbstractions#25
2016-05-17 11:02:10 -07:00
Kristian Hellang
230776f4b0
Added Permanent property to configure RequireHttpsAttribute
...
Fixes #4561
2016-05-16 16:18:53 -07:00
mnltejaswini
61a176e478
[Perf] Cache the default values for action arguments to avoid Activator.CreateInstance per argument.
...
Fixes #4470
2016-05-16 11:43:34 -07:00
mnltejaswini
5fb36ae406
[Perf] Replace Activator.CreateInstance with cached delegate in RazorPageFactoryProvider
...
Fixes #4470
2016-05-16 11:26:33 -07:00
mnltejaswini
0e4b838864
[Perf] Replace Activator.CreateInstance with cached delegate in Model Binders
...
Fixes Part1 of #4470
2016-05-16 11:26:33 -07:00
N. Taylor Mullen
fa29396141
Revert "Add Visual Studio specific RC1 binaries."
...
This reverts commit 687fd72efd , a140440196 , 698980943a and 3ebb14ee4b .
#4405
2016-05-16 11:12:24 -07:00
Ryan Nowak
1e02fd2e6b
Merge invoker back into one class
...
This will help future generations maintain this class. Notice that the
protected methods that are going away all just call into another
extensibility point (other than the executor). If we need to we could make
that extensible in the future and then we have the same support with fewer
hooks and less complexity.
2016-05-13 17:43:59 -07:00
Ryan Nowak
51e133ab9f
Add asserts to DiagnosticSource
2016-05-13 15:05:35 -07:00
Ryan Nowak
652e330875
Fix #4631 and avoid Task<T> creation in invoker
...
This change corrects and ordering bug between the creation of the
'context' and the diagnostic source event that occurs before a synchronous
filter's 'after' stage.
Also made some simple changes to avoid allocating Task<T> in many common
cases. Now we'll only create the Task<T> when we really need it (async
filters).
2016-05-13 08:53:56 -07:00
Ryan Nowak
128d74e2a0
Refactor Argument Binder
...
This change just rearranges some code in the argument binder with a mind
towards performance and clarity. We're removing a few Task<T>'s here as
well in certain cases, but not yet all of them. We additionally save a
dictionary in the case where you have bound properties.
Hopefully these changes break the code into more discrete and sensible
units without multiple levels of indirection without abstraction.
- Main 'driver' code
- BindModel
- ActivateProperty
2016-05-13 08:12:14 -07:00
Ryan Nowak
4d63ffa879
Make ValueProvider creation lazy
...
We want this change to avoid MVC eagerly reading the form. This is good
for general perf and also for scenarios where you want read the body
yourself (large file uploads).
We DO have scenarios where you want to configure the value providers
per-request or also to change the limits on the value providers (form) so
it's worth keeping these around on the context.
2016-05-13 08:11:21 -07:00
Kiran Challa
e483478415
Merge branch 'release' into dev
2016-05-12 09:35:33 -07:00
Ryan Nowak
fb5d92bdc0
Change our cached task to a field
...
This makes it more inlinable and saves a volatile lookup on netstandard.
2016-05-11 18:09:21 -07:00
Ryan Nowak
04ffc4d2eb
Clean up DiagnosticSource code in invoker
2016-05-11 17:41:03 -07:00
Kiran Challa
d6a9068008
[ Fixes #4616 ] Filter caching is too aggressive
2016-05-11 16:58:45 -07:00
Ryan Nowak
7bd297c395
Remove unused field
2016-05-11 16:48:55 -07:00
Kiran Challa
3c2bdfd368
Merge branch 'release' into dev
2016-05-03 12:29:33 -07:00
Kristian Hellang
f4679fe74f
Changed RequireHttpsAttribute to default to 302 instead of 301
2016-05-03 12:11:18 -07:00
David Obando
742a9e3f3b
Reduce the number of allocations during model validation
...
When the service receives a model (say, via a POST message) MVC validates it to ensure the model is in a correct state. Validation currently incurs in many allocations that can be avoided. This tackles two of them:
1. We're now caching the generic `GetEnumerator<T>` method infos generated on the fly during collection validation, and
2. We're now only initializing `ModelErrorCollection` on demand.
The first one incurs in the additional allocation of 1 long-lived dictionary object, which will grow only to the amount of `Collection<T>` types used by the model being validated. This is expected to be a small to medium number.
The second change assumes that class `ModelStateEntry` isn't thread safe, as model validation isn't multithreaded.
This resolves #4434 and #4435 .
2016-05-02 19:28:20 -07:00
Ryan Brandenburg
c6a6aae15f
Merge branch 'release' into dev
2016-05-02 16:52:29 -07:00
Ryan Brandenburg
3aa42617a4
Add transitive reference
2016-05-02 16:49:57 -07:00
Pranav K
3d494fd732
Merge branch 'release' into dev
2016-05-02 14:58:54 -07:00
Pranav K
36146a6139
Fix build warnings
2016-05-02 14:52:02 -07:00
Kiran Challa
d30290c310
Merge branch 'release' into dev
2016-05-02 13:36:35 -07:00
Kiran Challa
ad065892fd
[ Fixes #4575 ] Logging ArgumentOutOfRangeException
2016-05-02 13:16:08 -07:00
jacalvar
c85c22282b
Merge branch 'release' into dev
2016-05-02 12:26:37 -07:00
jacalvar
059ec0f353
[ Fixes #4525 ] Get rid of DNX services
2016-05-02 12:16:08 -07:00
Pranav K
0ff2f875d9
Avoid holding on to DependencyContext instance
...
Fixes #4527
2016-04-29 14:44:55 -07:00
mnltejaswini
cba4d1dd0c
[Perf] Reduce SelectListItem and other allocations when generating HTML for select lists
...
Fixes #3953
2016-04-29 11:58:02 -07:00
Filip W
f567258f14
changed GetFormat to virtual
2016-04-27 18:08:45 -07:00
Doug Bunting
d8d2e54506
Remove extra options to manipulate `JsonSerializerSettings`
...
- #4339 : remove non-recommended JSON formatter constructors
- affects `JsonInputFormatter`, `JsonOutputFormatter`, `JsonPatchInputFormatter`
- `JsonOutputFormatter` cleanup also impacts `JsonHelper`
- rename and make `SerializerSettingsProvider` class public; use it as appropriate
- #4409 : make `SerializerSetings` properties get-only and `protected`
- affects `JsonInputFormatter`, `JsonOutputFormatter`
Recommended patterns:
- change `JsonSerializerSettings` values in `MvcJsonOptions` for almost all customizations
- find `JsonOutputFormatter` in `MvcOptions.OutputFormatters` when limiting per-result formatters
- start with `JsonSerializerSettingsProvider.CreateSerializerSettings()` when customizing a per-result formatter
2016-04-27 14:48:16 -07:00
mnltejaswini
0788edbd4b
[Perf] Cache the metadata for known type "object"
...
Fixes #4377
2016-04-25 13:03:52 -07:00
Pranav K
b3a65b485f
Simplify assembly load on CoreCLR
...
Fixes #4328
2016-04-25 09:45:23 -07:00
Ryan Nowak
756cd2dab8
Remove OperationBindingContext
...
This change trims a few concepts that aren't really needed inside
ModelBinders anymore, and removes the OperationBindingContext class.
2016-04-25 09:29:03 -07:00
Kiran Challa
4e8e30437f
Merge branch 'release' into dev
2016-04-23 06:57:08 -07:00
Ryan Nowak
af58c2e6b6
Streamlining action selection and route values
...
Removes a few concepts we don't need
Improves documentation
More things are IDictionary instead of other random types
2016-04-22 17:36:23 -07:00
Kiran Challa
a259638d79
Filters provided by filter providers are made to never be cached
...
[Fixes #4504 ] Possible double-execution of filter providers
2016-04-22 16:56:08 -07:00
mnltejaswini
f1fe5e26fc
[Perf] RazorPage.CreateModelExpression is allocating expression names
...
Fixes #4469
2016-04-22 12:55:28 -07:00
Sebastien Ros
4b4d67e48e
Merge branch 'release' into dev
2016-04-22 11:54:56 -07:00
Sébastien Ros
2c639f83c4
Fixing BindNever attribute and Type model binding
...
Fixes #4505
2016-04-22 11:52:08 -07:00
Ryan Nowak
8efd12187c
Remove unused interface
2016-04-21 14:01:46 -07:00
jacalvar
683356ea59
Merge branch 'release' into dev
2016-04-21 10:39:45 -07:00
Ryan Nowak
87704c67e1
React to routing cleanup
2016-04-21 07:55:20 -07:00
jacalvar
d9aacd0f87
[Fixes 4509] Stop registering disposable objects in our controller helper methods
2016-04-20 17:00:34 -07:00
mnltejaswini
73dc7bf48b
[Perf] Check for Logger.IsEnabled in logging methods of MvcCoreLoggerExtensions
...
Fixes #4466
2016-04-19 11:49:56 -07:00
Doug Bunting
1492db35fa
Merge branch 'release' into dev
2016-04-16 13:07:08 -07:00
mnltejaswini
4e97c72eeb
[Perf]:Cache TypeConverters in SimpleTypeModelBinder
...
Fixes #4361
2016-04-15 18:23:49 -07:00
Doug Bunting
7a1ac034f9
Special-case use of `razorPage.Model` property in `ExpressionMetadataProvider`
...
- #3978
- better-aligns `ExpressionMetadataProvider` with `ExpressionHelper`
nit: mock less in `RazorPageCreateModelExpressionTest`
2016-04-15 17:15:33 -07:00
mnltejaswini
a565f9ff58
[Perf] Reduce DefaultTagHelperContent allocations in LinkTagHelper and ScriptTagHelper
...
Fixes #4468
2016-04-15 13:29:49 -07:00
mnltejaswini
fa34f61d46
[Perf] Avoid Service Provider lookups when activating common Singleton properties of a Razor Page
...
Fixes #4244
2016-04-14 16:52:25 -07:00
BrennanConroy
588abbc588
Merge branch 'release' into dev
2016-04-14 15:55:14 -07:00
BrennanConroy
010e8a4e37
Move dependency to netstandard only
2016-04-14 15:54:59 -07:00
BrennanConroy
4f8c1d49d0
Merge branch 'release' into dev
2016-04-14 13:53:24 -07:00
BrennanConroy
b35814f035
Add serialization.primitives for Newtonsoft.Json
2016-04-14 13:53:10 -07:00
Ryan Nowak
a73db1a9bd
Fixes #4471 - Don't call Enum.ToString()
2016-04-14 10:15:55 -07:00
Doug Bunting
ee2cfa1963
Merge remote-tracking branch 'origin/release' into dev
2016-04-13 16:04:14 -07:00
Doug Bunting
eda647e270
Complete the doc comments for filters
...
- #3851
- add lots of words
- correct that vs. which confusion
2016-04-13 16:01:30 -07:00
Ryan Nowak
cffc381a69
Update xproj output path
2016-04-13 14:03:44 -07:00
Eilon Lipton
0cf9a4b7f2
Merge branch 'release' into dev
2016-04-13 12:10:53 -07:00
Eilon Lipton
4f24339740
Fix package metadata
2016-04-13 12:07:04 -07:00
Ryan Nowak
84caf6968d
Merge branch 'release' into dev
2016-04-11 15:50:26 -07:00
Ryan Nowak
3ec60a0181
Fix #4447 - Teach MVC to understand defaults
...
The wireup for defaults in attribute routes was missing
2016-04-11 14:38:29 -07:00