* 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
- #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
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.
- #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`
- 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
For a typical configuration, it's now possible to cast a parameter
descriptor to ControllerParameterDescriptor or
ControllerBoundPropertyDescriptor to access the corresponding reflection
type.
- aspnet/Razor@e722f90 removed `HashCodeCombiner` from `public` surface of Razor assembly
- not actually needed since `IReadOnlyTagHelperAttribute` implementations provide a solid `GetHashCode()`
- #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
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.
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.
- #1418
- add new fallback binding in `DictionaryModelBinder`
- similar to MVC 5 approach but more explicit and with better key conversion support
- fix bugs in `PrefixContainer` encountered while adding new tests of #1418 scenarios
- did not handle entries like "[key]" or "prefix.key[index]" correctly
- refactor part of `GetKeyFromEmptyPrefix()` into `IndexOfDelimiter()`; share with `GetKeyFromNonEmptyPrefix()`
- extend `ReadableStringCollectionValueProviderTest` to cover bracketed key segments
nits:
- remove use of "foo", "bar", and "baz" in affected test classes
- `""` -> `string.Empty`
- `vpResult` -> `result`
- was "CS0649: Field is never assigned to, and will always have its default value `null'"
- visible only in VS builds due to aspnet/dnx#2284
nit: let VS do its thing with Microsoft.AspNet.Mvc.Localization.xproj