Commit Graph

1325 Commits

Author SHA1 Message Date
sornaks d2c3985cd6 Issue #1445 - Cleanup on MvcOptions.ApplicationModelConventions. 2015-02-10 13:17:19 -08:00
Kiran Challa f474f7116a Temporarily fix build break related to XmlSerailizer tests failing in Core CLR. 2015-02-10 12:41:48 -08:00
Pranav K 8ed522de64 Revert "Temporarily skip MvcSampleTests scenario to workaround System.Dynamic.Runtime issue"
This reverts commit b3c38bc573.
2015-02-10 08:32:46 -08:00
Pranav K 92f7ce1d31 Removing build time dependencies 2015-02-10 08:32:30 -08:00
Doug Bunting f93fca1077 PR comments
- change `AdditionalValues` type to `IDictionary<object, object>`
- copy `ModelMetadata.AdditionalValues` in `AssociatedMetadataProvider` sub-classes

nits:
- add XML comments
- correct indentation in `CachedModelMetadata`
2015-02-09 16:24:28 -08:00
Doug Bunting 3303286288 Add `ModelMetadata.AdditionalValues` property bag
- #1758
- provide the property bag in `ModelMetadata`; seal it in `CachedModelMetadata`
- add unit tests
- include use of `AdditionalValues` in model binding functional test

nits:
- expose `AdditionalValues` as an `IDictionary` though MVC 5 uses `Dictionary`
- seal `ModelMetadata.Properties` collection as well
- cover a few properties previously missed in `CachedDataAnnotationsModelMetadataTest`
- correct two `ModelMetadataTest` method names
2015-02-09 15:59:34 -08:00
Pranav K b3c38bc573 Temporarily skip MvcSampleTests scenario to workaround System.Dynamic.Runtime issue 2015-02-09 15:19:14 -08:00
Pranav K 6ef5518f8a Remove IRazorFileProviderCache and rely on file expiration triggers to
file change expiry.

Fixes #1969
2015-02-09 15:08:26 -08:00
Hao Kung 4eb9c777ff React to removal of AddScopedInstance 2015-02-09 14:48:38 -08:00
Yishai Galatzer 65839b678c Feature: Add DebuggerInfo to ApplicationModel 2015-02-09 12:05:36 -08:00
Kiran Challa 4ecbe8c709 [Fixes #1065] Need a way to specify "just type" with produces 2015-02-09 10:46:24 -08:00
Doug Bunting 45aae5956d Correct XML comments so all references are clean
- avoids failed full builds
2015-02-09 10:25:09 -08:00
Anthony Sneed 2c21c7c9c7 [Resolves Issue #1787] Added InstanceOf, InstanceOfOrDefault, InstancesOf extension methods to IEnumerable<IOptionDescriptor<object>>.
Added RemoveTypesOf extension method to OutputFormatterDescriptor, ModelBinderDescriptor, ValueProviderFactoryDescriptor.
2015-02-09 10:46:01 +01:00
Youngjune Hong 57c04835de Updating ActionContext for the default constructor and the setter methods 2015-02-06 20:27:42 -08:00
Kiran Challa 2e938a51f8 [Fixes #1878] Investigate Xml formatters tests failures on Windows 2008 R2 OS 2015-02-06 13:23:12 -08:00
Pranav K 3f28a14c17 Fixing xml doc comments 2015-02-06 06:19:24 -08:00
Pranav K be3f64c52d Change comment to fix policheck 2015-02-06 05:58:55 -08:00
Youngjune Hong c7d09d7ad7 Introducing UrlActionContext and UrlRouteContext, and updating IUrlHelper accordingly 2015-02-05 19:41:21 -08:00
Ajay Bhargav Baaskaran ac6a1a6a80 Replaced status code number with constants 2015-02-05 16:43:59 -08:00
Ryan Nowak 3c380bc38e [Perf] #1550 - Turn ModelMetadataProvider into a singleton
The modelmetadataprovider does significant reflection caching, which shows
up as a hotspot. It's only of our most commonly used services, so not only
do a TON of instances get created, they are very heavy-weight because of
the two ConcurrentDictionary instances they have.
2015-02-05 16:32:04 -08:00
Yishai Galatzer e94cec51fa Script Tag Helper
Implement Script TagHelper
Add functional test

Resolved #1576
2015-02-05 14:35:02 -08:00
Ryan Nowak 12f8f23ccb Make BindingSource extensible
This is a major refactor of how IBinderMetadata interacts with model
binders and value providers. We're doing this to support better
extensibility for metadata in ApiExplorer.

You'll notice a bunch of deleted code in DefaultApiDescriptionProvider
that maps metadata marker interfaces to a fixed list of Api sources. This
is replaced now with IBindingSourceMetadata - which also replaces the
hierarchy of marker interfaces. Now user code can create an arbitrary
binding source and have a consistent API for model-binders,
value-providers and full-visibility in ApiExplorer as
well.

Additonally, there's some error checking in place that better enforces the
constraints we already have in the system. IE you can't create a 'greedy'
model binder that uses value-provider data.

Two additional enhancements are planned for followup PRs:
1. Add a BindingSource property to model-metadata. This will remove some
duplication, but I want to delay it because it would touch another 10 or
so files.

2. Add an extensibility interface for our 'special' model binders like the
file binder so these can show up in ApiExplorer as well.
2015-02-05 13:41:31 -08:00
Kiran Challa 8c32d9e207 Removed misplaced test files due to bad merge.
The latest version of these files are already present in Microsoft.AspNet.Mvc.Xml.Test.
2015-02-05 13:21:33 -08:00
Ajay Bhargav Baaskaran 5e704cd5ef Added custom exception message for Format Exception 2015-02-05 10:51:32 -08:00
Pranav K 59db8143da Updating CompilerCache to use IMemoryCache and file system watcher to
expire files in razor file cache.

Add a functional test to ensure the compiler cache does not get
initialized until the first request to a View.

Fixes #1708
2015-02-05 09:52:17 -08:00
N. Taylor Mullen 19ca77ac2d Fixed xml docs. 2015-02-04 16:40:06 -08:00
Yishai Galatzer 5a3863d562 Implement StreamOutputFormatter
Include Functional tests and unit tests

Resolves #1653
2015-02-04 16:04:02 -08:00
sornaks 4691823a50 Issue #1785 - Changes to add CacheProfiles for response caching. 2015-02-04 15:25:45 -08:00
sornaks 6e8cc6ba74 Adding extension methods ConfigureMvcOptions and ConfigureRazorViewEngineOptions. 2015-02-04 14:07:07 -08:00
Harsh Gupta e805e67b4c [Fix for #1929] HeaderModelBinder needs to honor explicit name. 2015-02-03 19:36:48 -08:00
damianedwards 2c3148fd25 Remove npm/grunt from TagHelpers project.json to fix build 2015-02-03 17:18:37 -08:00
sornaks accf0c76f0 Bug #1915 - Remove AddMvc overload with default parameter. 2015-02-03 16:10:33 -08:00
sornaks 2c5ae68ab6 Issue #1944: Move DelegatingStream to internal namespace and rename to NonDisposableStream. 2015-02-03 13:34:42 -08:00
Mugdha Kulkarni c669f7a612 Fixing xml doc issue 2015-02-03 13:20:30 -08:00
N. Taylor Mullen c3006f6b21 React to aspnet/Razor#285.
- Cannot only provide assembly name to @addtaghelper.
2015-02-03 12:33:30 -08:00
damianedwards ad66a71eeb LinkTagHelper activates ILogger directly from DI:
- #1948
2015-02-03 11:41:50 -08:00
damianedwards 3d33418f31 Add the LinkTagHelper:
- #1580
2015-02-03 10:12:38 -08:00
Kiran Challa 49294b7d28 Removed custom object result accepting status code as out of box ObjectResult provides this already. 2015-02-02 10:20:20 -08:00
Ryan Nowak 514460b801 Making FormatFilter a Service and some test changes 2015-01-31 23:51:58 -08:00
Mugdha Kulkarni d7f2630ad2 Making FormatFilterAttribute an IFilterFactory 2015-01-31 23:18:30 -08:00
Mugdha Kulkarni 6a0f471a42 Adding ClearMediaTypeMappingForFormat to FormatterMappings and other PR comments 2015-01-31 23:18:24 -08:00
Mugdha Kulkarni addd8dd5d2 Changing produces and format filter interaction 2015-01-31 23:18:18 -08:00
Mugdha Kulkarni 7ee80020e1 Incorporating PR comments - 1/19 2015-01-31 23:15:19 -08:00
Mugdha Kulkarni c8b911b596 Adding functional tests and attribute route tests.
Incorporating PR coments.
2015-01-31 23:15:13 -08:00
Mugdha Kulkarni d91b7776b3 This is MVC part of feature URL Extensions. It does following:
1. Creates a filter called FormatFilter. This will look at the format parameter if present
   in the route data or query data and sets the content type in ObjectResult
2. It adds new options called FormatterOptions, that contains the map of format to content tyepe
3. A method in MVC options to add the formatter mapping
2015-01-31 23:15:04 -08:00
N. Taylor Mullen cf7d428abd React to aspnet/Razor#207 changes. 2015-01-31 23:14:54 -08:00
Kiran Challa e5176d22f6 [Fixes #1121,#1508] Wrap objects for serialization/deserialization and DelegatingEnumerable<> support for IEnumerable<T> and IQueryable<T> 2015-01-30 18:10:01 -08:00
Pranav K 7c7eaa264d Use CRC32 instead of MD5 for hashing the file content.
Fixes #1800
2015-01-30 18:01:24 -08:00
Doug Bunting 6524930778 React to quick cleanup in Routing
- `DefaultInlineConstraintResolver` has no need of a `IServiceProvider`
2015-01-30 17:52:10 -08:00
Harsh Gupta 8e91c1ada6 [Fix for #1850]Produces, Consumes and ObjectResult throw if there is a match all content type. 2015-01-30 15:54:58 -08:00