Commit Graph

1919 Commits

Author SHA1 Message Date
Stephen Halter 43064ef8b6 React to Kestrel rename
aspnet/KestrelHttpServer#11
2015-08-11 16:30:03 -07:00
Ryan Nowak 12ceb6ae1c React to DI namespace change part 3. 2015-08-11 15:44:47 -07:00
Ryan Nowak a1a6be06b6 React to namespace change in DI part 2. 2015-08-11 14:30:07 -07:00
Ryan Nowak f7cea9b6d7 React to namespace change in DI. 2015-08-11 14:10:30 -07:00
Ryan Nowak 3ad3f88d69 Fix MVC build break due to deleted package 2015-08-11 12:21:01 -07:00
Chris R 77865ca314 #2939 React to CoreCLR Cryptography package changes. 2015-08-11 11:00:14 -07:00
Doug Bunting 9fc3d25bfc Fix build break: Missing a recently-added parameter 2015-08-11 09:03:51 -07:00
Doug Bunting 83a559c28c Add `ModelValidationNode`s consistently
- #2633
- do not leave `ModelBindingResult.ValidationNode` as `null` when we hit the `null` `RawValue` special case
 - move two bits of code together to make the special case more obvious
- add `ModelValidationNode` (that suppresses validation) when `HttpRequestMessageModelBinder` is successful
 - also suppress validation of `HttpRequestMEssage` properties
- suppress validation in `CancellationTokenModelBinder`, `FormCollectionModelBinder`, `FormCollectionModelBinder`
- do not create a `ModelValidationNode` when validation fails in `TypeConverterModelBinder`

nits:
- improve some doc comments
- add a quick `HttpRequestMessageModelBinderTest`
2015-08-11 08:30:29 -07:00
Doug Bunting d45e2ee3f5 Handle broader range of collection types in model binding
- #2793
- add `ICollectionModelBinder`, allowing `GenericModelBinder` to call `CreateEmptyCollection()`
- adjust `CollectionModelBinder` and `DictionaryModelBinder` to activate model if default types are incompatible
 - do not create default (empty) top-level collection in fallback case if Model already non-`null`
- change type checks in `GenericModelBinder` to align with `CollectionModelBinder` capabilities
 - add special case for `IEnumerable<T>`
- correct `ModelMetadata` of a few tests that previously did not need that information
2015-08-11 08:26:49 -07:00
sornaks b6a109e2a3 Making DefaultDisplayTemplates and DefaultEditorTemplates use IHtmlContent.
- Making TagBuilder's InnerHtml an IHtmlContent.
- Delay encoding until the content is written.
- Moving BufferedHtmlContent to Common cos it is used in aspnet/Razor also.
- Changing GenerateOption to take in a string and create StringHtmlContent.
- This reduces the space used by around 13%.
2015-08-10 14:55:34 -07:00
N. Taylor Mullen a0da6ec19f Add `AddHtmlAttributeValues` for `TagHelper`s.
- Refactored `WriteAttributeTo` to allow re-use of some of the core attribute writing logic. The refactoring was based on removing the `Begin`/`EndContext` for instrumentation bits which isn't valid in a `TagHelper` attribute scenario.
- Added unit tests to validate attributes are properly added to `TagHelperExecutionContext`.
- Added functional test to validate everything is output as expected with dynamic attributes (encoded and non-encoded).

aspnet/Razor#247
2015-08-10 12:06:02 -07:00
Ryan Nowak ff6cbfd7cf Make saving TempData operate via a filter
This change moves the responsibility for saving TempData into a filter,
which is registered with other View features. This moves TempData into the
ViewFeatures package.

ActionResults which require TempData to be kept use a new marker interface
which is handled by the filter.
2015-08-07 16:53:11 -07:00
Ajay Bhargav Baaskaran b5237b29b5 [Fixes #2896] Made UrlHelper.Content behavior consistent with MVC 5 2015-08-07 16:40:23 -07:00
KevinDockx 94fad918a3 Replace of Add operation (jsonpatch dynamic support) 2015-08-07 16:10:07 -07:00
Pranav K 9d467810b5 Switching to Autofac from NuGet.org 2015-08-07 15:53:53 -07:00
Pranav K 91bbfe949c * Cleaning up unused types in Razor precompilation. 2015-08-07 11:09:11 -07:00
Pranav K dfacd2543b * Remove support for updateable precompiled views.
* Allow precompiled views to be served when source file does not exist in
  file system.
* Cache results for views that do not exist on disk.

Fixes #2462 and fixes #2796.
Partially addresses #2551
2015-08-07 11:08:48 -07:00
Pranav K 982213e9e0 Reacting to DI changes 2015-08-07 10:50:25 -07:00
Ryan Nowak 152e4ef915 Fix #2874 part 2 - Add AddLocalization() overload for MVC localization. 2015-08-07 09:49:08 -07:00
Ryan Nowak 4b3bac9dbb Fix #2874 part 1 - XML formatter support for IMvcBuilder 2015-08-07 08:26:27 -07:00
Ajay Bhargav Baaskaran fcad4c5c57 [Fixes #2841] Support comma separated globbed include and exclude pattern in Script and Link tag helpers 2015-08-06 16:55:12 -07:00
Doug Bunting ed4896d1fd Support `[Display(Name = "")]` on enum values
- #2851
2015-08-06 16:07:50 -07:00
Doug Bunting 4a813773d0 Make `CompositeValueProvider` consistent with `IBindingSourceValueProvider` contract
- #2907
- return `null` if `Filter()` finds no matching value provider in collection
- fix lack of defensiveness in model binders' use of `IBindingSourceValueProvider` implementations
- remove test workaround for unusual `CompositeValueProvider` behaviour
2015-08-06 16:05:13 -07:00
sornaks 1aef84b50d Issue #2745 - ViewHierarchyUtility.GetHierarchicalPath does not handle root paths *nix file systems.
Fix: It is not necessary to check for root paths in this place because ViewHierarchyUtility.GetHierarchicalPath is always called with a relative path. Hence removing the check.
2015-08-06 10:31:11 -07:00
Troy Dai 87c5384390 Add feeds for Roslyn and CoreFx 2015-08-05 10:44:36 -07:00
Doug Bunting bda850187d Add support for jQuery syntax in form data
- #2705
- add `JQueryFormValueProvider` and `JQueryFormValueProviderFactory`
  - carry some code forward from MVC 5; correct to follow current coding guidelines
- refactor `ReadableStringCollectionValueProviderTest` into abstract `EnumerableValueProviderTest`
  - enables reuse in new `JQueryFormValueProviderTest`
  - also run these tests in `CompositeValueProviderTest`

nits:
- do not create a duplicate `CompositeValueProvider` instance in `Filter()`
- correct garbled sentence in `IBindingSourceValueProvider` doc comments
- simplify `FormValueProviderFactoryTest` (no need for Moq) and correct test name
- correct test class / file names
  - `CompositeValueProviderTests` -> `CompositeValueProviderTest`
  - `FormValueProviderFactoryTests` -> `FormValueProviderFactoryTest`
2015-08-05 10:31:24 -07:00
Troy Dai a7d717d19c Update CoreCLR versions 2015-08-05 09:35:37 -07:00
Pranav K 018e803dc1 Removing Autofac dependency \ tests from ControllersFromServicesWebSite 2015-08-04 15:50:10 -07:00
Pranav K 5d4c684758 Using packages from Autofac nightly feed. 2015-08-04 15:12:24 -07:00
Pranav K 43e4870fa2 Switching to the official Autofac package. 2015-08-04 15:12:19 -07:00
N. Taylor Mullen 0ef68eefc8 Added default `UrlResolutionTagHelper` to resolve app relative URLs.
- Razor removed the ability to automatically resolve URLs prefixed with `~/`; therefore `ScriptTagHelper`, `LinkTagHelper` and `ImageTagHelper` have changed to take in `IUrlHelper`s and auto-resolve their URL based properties if they start with `~/`.
- Added a catch-all `~/` resolver for non `TagHelper` based HTML elements. Razor used to resolve any attribute value that started with `~/` now the behavior is restricted to attributes that can contain URLs.
- Updated `IUrlHelper` to accept `null` values.
- Added functional tests to validate that URLs resolve correctly.
- Updated `TagHelper` tests to ensure that URLs are resolved via an `IUrlHelper`.

#2807
2015-08-03 16:00:33 -07:00
N. Taylor Mullen 6d228a62dc Added missing `HtmlAttributeNotBound` to `ViewContext` property.
- Did not add a test to validate the behavior. None of the other `TagHelper`s validate that a property is not visible/bound.

#2901
2015-08-03 15:05:08 -07:00
Ajay Bhargav Baaskaran 2792f10f9a [Fixes #2862] asp-append-version now works with urls containing fragment 2015-08-03 12:06:18 -07:00
Ryan Nowak 68c52adef4 Fix #2837 - Make it easier to get ParameterInfo/PropertyInfo
For a typical configuration, it's now possible to cast a parameter
descriptor to ControllerParameterDescriptor or
ControllerBoundPropertyDescriptor to access the corresponding reflection
type.
2015-08-03 10:53:33 -07:00
N. Taylor Mullen c8df81ef91 React to aspnet/Razor#459. 2015-07-31 15:47:29 -07:00
Pranav K e0abf70a80 Reacting to DI changes 2015-07-31 14:32:32 -07:00
anurse 0926e0c280 react to DNX renames 2015-07-31 13:48:22 -07:00
Victor Hurdugaci 84192cb1a9 Fix the casing of a pacakge reference. It is causing cross plat issues 2015-07-30 11:39:28 -07:00
Ajay Bhargav Baaskaran e4049c07eb Razor boolean and null attribute special case handled correctly
- Issue #2769
 - Special case is only applied to null and bool value with no surrounding
   whitespace
2015-07-30 10:37:38 -07:00
Doug Bunting 260ac2939e Align `TagHelperOutputExtensionsTest.CaseSensitiveTagHelperAttributeComparer` with Razor.Runtime version
- was missing `Minimized` comparison
2015-07-29 15:44:03 -07:00
Pranav K 7120b2ff92 Removing MvcViewEngineDescriptor and switching to use OptionsSetup to
setup RazorViewEngine.

Fixes #2269
2015-07-29 14:14:07 -07:00
Doug Bunting bb158ec6ee Build break: React to aspnet/Razor@e722f90
- aspnet/Razor@e722f90 removed `HashCodeCombiner` from `public` surface of Razor assembly
- not actually needed since `IReadOnlyTagHelperAttribute` implementations provide a solid `GetHashCode()`
2015-07-29 09:40:14 -07:00
Victor Hurdugaci e96b4d7b94 React to DNX renames 2015-07-29 04:49:49 -07:00
Kiran Challa 06c8c79a0b Added repository information to Localization project 2015-07-27 11:13:59 -07:00
Doug Bunting 6106375306 Add `HttpOkResult`, `HttpOkObjectResult`, and `Ok()` methods in `Controller`
- #2825
- new class names align with existing types such as `HttpNotFoundResult` and `HttpNotFoundObjectResult`
- remove similar types from WebApiCompatShim and use replacements in `ApiController`
 - `NegotiatedContentResult<T>` remains because Core doesn't have an exact replacement

nits:
- add missing periods in some `Controller` doc comments
2015-07-23 18:49:36 -07:00
Ryan Nowak e91ce4560f Fix #2338 - Add ViewComponentResult
Makes it easier to render a view component from inside a controller. This
makes it possible to implement behavior where an ajax request refreshes
part of a page.
2015-07-23 17:52:52 -07:00
Ajay Bhargav Baaskaran 67474d8cbc [Fixes #2382] Use PostElement in Script and Link tag helpers 2015-07-23 10:52:57 -07:00
Ryan Nowak 5ae6d029ce Update designer file 2015-07-22 15:25:47 -07:00
Ryan Nowak bae442cf48 Fix for #2799 - OOM during TryUpdateModelAsync
The change here is that when we create the ModelValidationNodes to just
return them rather than adding them to the tree. For a very large model,
having these extra nodes in the tree would eventually cause an OOM.

We're going to be taking a more thorough look at this code separately,
hence the quick fix.
2015-07-22 08:37:16 -07:00
Andrew Stanton-Nurse 0f20eb9112 fix xml docs 2015-07-21 17:45:50 -07:00