Commit Graph

2141 Commits

Author SHA1 Message Date
Ryan Nowak 1ed22e5939 Avoid state machine and allocation for 0-parameters 2015-10-06 12:02:49 -07:00
Pranav K 04d72d8894 Simplify FileResult
Fixes #3249
2015-10-06 11:26:56 -07:00
Ryan Nowak 04c6fceb94 React to aspnet/Routing#215 2015-10-06 10:37:56 -07:00
Pranav K a602d548e2 Allow ViewFeature tests to run in dnxcore50 2015-10-06 09:46:49 -07:00
Anthony van der Hoorn a0764faa86 Bring arguments inline between before/after events 2015-10-05 16:42:25 -07:00
Ryan Nowak 32c174c791 CR feedback from attribute dictionary 2015-10-05 10:38:46 -07:00
Ryan Nowak ad3c257ef5 Fix for #3252 - Issues with pooled buffer + unicode
- Dispose buffers when Flush throws inside the Dispose method
- Compute size of buffers correctly
- Throw earlier when handed invalid-sized buffers
2015-10-05 09:45:23 -07:00
Pranav K f57e180971 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:53 -07:00
Pranav K 8d7b95655d Removing Autofac dependency 2015-10-03 12:18:19 -07:00
Ryan Nowak 6185b16795 Custom dictionary type for attributes 2015-10-02 18:08:58 -07:00
Ryan Nowak 4e08eda58d Use pooled memory for the streamwriter 2015-10-02 14:35:15 -07:00
Ryan Nowak 306776ff63 Minor cleanup/refactor of ViewResult
- Make ViewExecutor a service
- Add facades for ViewResult/PartialViewResult
- Add eventing for ViewFound/NotFound in PartialViewResult
- Add eventing around view execution
- Cleanup of some various eventing & our tests code
2015-10-02 08:18:00 -07:00
Kiran Challa eef6c3883a Renamed PhysicalFileProviderResult and VirtualFileProviderResult to PhysicalFileResult and VirtualFileResult respectively 2015-10-01 19:57:35 -07:00
Kiran Challa 130d94eb7e [Fixes #3068] TempData fails silently without sessions middleware 2015-10-01 19:28:46 -07:00
N. Taylor Mullen 7b58e03f90 Update 'build.cmd' alias parameter to use full name. 2015-10-01 11:59:19 -07:00
Pranav K 2028351bb8 React to WriteAttribute \ AddHtmlAttribute API changes 2015-10-01 10:19:14 -07:00
Pranav K 5a705d820d Replacing NotNullAttribute with thrown exceptions 2015-10-01 08:23:21 -07:00
Pranav K 3a876e387f Replacing NotNullAttribute with thrown exceptions 2015-10-01 06:19:18 -07:00
Pranav K 02c36a1c48 Replace NotNullAttribute with thrown exceptions 2015-09-30 17:18:16 -07:00
Kirthi Krishnamraju fa5f9399e8 Remove mono check from localization test 2015-09-30 11:44:00 -07:00
Ajay Bhargav Baaskaran eefa58e617 [Fixes #3043] Overflow exceptions converted to invalid value messages 2015-09-29 16:24:19 -07:00
Gerardo Melendrez f162f70c1e Fixed typo (occured to occurred) in comments and resources. 2015-09-29 10:19:26 -07:00
Doug Bunting 13af6f8e1a Wrap rather long line in 9243d83 2015-09-29 09:58:23 -07:00
Stefán Jökull Sigurðarson c713aa92ca Making the HtmlHelper.GetEnumSelectList take DisplayAttribute.GroupName into account to create select groups. 2015-09-29 09:53:48 -07:00
Pranav K 9243d832de Merge branch 'release' into dev 2015-09-28 23:16:33 -07:00
Pranav K 5b80edcdff Updating to release NuGet.config. 2015-09-28 23:16:31 -07:00
Ryan Nowak d37f5aeb31 Fix #3217 - Optimize IList.GetEnumerator allocations
This change fixes call sites on the main request path for a simple site
(model binding, validation, views) that allocate boxed list enumerators.

Some cases aren't addressed by this change because the fix is too invasive
or requires changing an important contract to take IList instead of
IEnumerable. Will follow up on those case by case in order of importance.
2015-09-28 16:17:48 -07:00
Doug Bunting 28aec3f5cc Support user overrides of system-provided `ModelError` messages
- #2969
- add `ModelBindingMessages` for configuration and `IBindingMetadataProvider` overrides
  - use `interface` to avoid `new` oddities when adding a setter to an `abstract` property
- add `IModelBindingMessages` to `ModelMetadata` for use in rest of the product code
- plumb the various bits through the system
- add integration tests using a custom `IBindingMetadataProvider`s to override messages

nits:
- remove unused resources
- use `AttemptedValue` and not `model` in `SimpleTypeModelBinder`
2015-09-28 15:50:21 -07:00
Ryan Nowak 0d6edf240a Move ModelExplorer to ViewFeatures 2015-09-28 14:14:40 -07:00
Søren Kruse ec18b35123 Add FormatterCollection<T>
#2945
2015-09-28 13:23:19 -07:00
Ryan Nowak 67b43b4cfe Workaround Mono bugs to fix travis
This change works around two mono issues that are blocking travis. I'd
like to have tests skip instead, but unfortunately that would mean not
running any validation tests on mono so this seems better.

- RuntimeHelpers.GetHashCode will sometimes crash the runtime
- PropertyHelper sometimes returns throws null-ref
2015-09-28 12:58:45 -07:00
Pranav K 18c80d156c Replace NotNullAttribute with thrown exceptions 2015-09-26 23:48:43 -07:00
Doug Bunting eff10cdd66 Move `ModelStateDictionaryExtensions` into `Microsoft.AspNet.Mvc.ModelBinding` namespace
- missed the inconsistency when reviewing
- kept class in ViewFeatures assembly because it depends on `ExpressionHelper`

nit: wrap some long lines
2015-09-26 18:15:04 -07:00
Muchiachio b28debf442 Generic ModelStateDictionary add and remove extensions
- Added generic add model error and remove extensions for
ModelStateDictionary, to avoid using hard coded strings then specifying
model state dictionary keys.
- Added generic removal all  extension for ModelStateDictionary, to
support removing all the model state keys for given expression.

aspnet/Mvc#3164
2015-09-26 18:14:58 -07:00
Pranav K 6a0a24481a Asynchronously flush the HttpResponseStreamWriter after a view has been rendered.
This solves a perf issue for views which produce content that is smaller
than the buffer size of HttpResponseStreamWriter. In this case, the writer
ends up synchronously writing to the Response as part of Dispose which
affects perf.
2015-09-25 21:07:15 -07:00
Ryan Nowak 8a502dbe5d Rewrite of validation 2015-09-25 16:56:42 -07:00
Kirthi Krishnamraju 0889b18f95 Add localizers to validation attributes 2015-09-25 16:13:21 -07:00
Nero Sule 49acfd562e Adds common interfaces around Models (Implements #3158) 2015-09-25 11:10:59 -07:00
Ajay Bhargav Baaskaran 9c81b95d1b Renamed Controller.Context to Controller.HttpContext
- #3165
2015-09-25 11:01:30 -07:00
Ryan Nowak 5a80435534 API Review - Move ModelBindingHelper 2015-09-25 09:59:56 -07:00
Kirthi Krishnamraju ed509f65a2 fix #2747: Fix Mvc localization test once dnx support reading resources 2015-09-24 12:53:20 -07:00
Pranav K 1833e06984 TModel substitution in Razor pages has broken intellisense
Fixes #3185
2015-09-23 17:47:52 -07:00
Pranav K ff4100e292 Generate an expression to create line mappings for ModelChunk directives 2015-09-23 16:14:29 -07:00
Pranav K 89f58aa49f Allow @model specified in a page work with @inherits directive in
_ViewImports

Fixes #3144
2015-09-23 12:10:10 -07:00
Ryan Nowak 80add92de8 React to removal of TagHelperContent.ToString()
Avoid calling ToString on a TagHelperContent.

Also react to new properties on TagHelperCodeGenerationContext
2015-09-23 11:09:27 -07:00
Doug Bunting d8d0a1ab89 Rename `ModelMetadata.IsCollectionType` and add "real" `ModelMetadata.IsCollectionType`
- #3022
- existing `IsCollectionType` -> `IsEnumerableType`
- use new `IsCollectionType` in a few places
2015-09-22 19:05:40 -07:00
Pranav K 1574637a6a Reacting to Microsoft.AspNet.Cors version change 2015-09-22 11:26:04 -07:00
Pranav K 9eb2c5b810 Reacting to IExpirationTrigger -> IChangeToken rename 2015-09-22 08:14:34 -07:00
Ryan Nowak b544aabfdb Fix #3111 - Don't trounce content-type in VCR
This change makes ViewComponentResult respect an existing Content-Type
setting on the HttpResponse. Code is very similar to the code in
ViewExector, and includes the same quirks.
2015-09-21 23:20:20 -07:00
Ryan Nowak a318c4599a API Review - Split up .Actions
Abstractions - Core MVC extensibility

Controllers - MVC implementations of .Abstractions and supporting
contracts

Infrastructure - General purpose support APIs. Metadata APIs that don't
fit clearly with a feature or with .Abstraction
2015-09-21 21:54:02 -07:00