Commit Graph

1356 Commits

Author SHA1 Message Date
Hao Kung 94ef6cf8fa React to Authorize changes 2015-02-16 15:40:57 -08:00
Ajay Bhargav Baaskaran 3d30fd653e added Link method to IUrlHelper 2015-02-16 13:38:12 -08:00
N. Taylor Mullen 48a1cbb0e5 Fixed build break.
- IScopedInstance now implements IDisposable.
2015-02-16 13:08:10 -08:00
Pranav K 5e69d90076 * Modify DefaultControllerTypeProvider to look at the object graph to
determine if any ancestor has the "Controller" suffix.

* Introduce NonControllerAttribute to opt out of Controller detection.

Fixes #1274
2015-02-15 22:11:37 -08:00
Doug Bunting 8a9d0d16f7 Add project.lock.json to .gitignore 2015-02-15 09:56:35 -08:00
Praburaj 3fc61eeac9 Introducing SkipStatusCodePagesAttribute attribute to disable StatusCodepages 2015-02-13 16:03:59 -08:00
Doug Bunting 0549769fd0 Set `ModelMetadata.TemplateHint` based on data annotations
- add `CachedDataAnnotationsMetadataAttributes.UIHint`
- set `ModelMetadata.TemplateHint` using `UIHintAttribute` or `HiddenInputAttribute`
- add doc comments for `TemplateHint`-related properties and methods
- add unit tests and use these attributes in functional tests

nits:
- cache and seal `CachedModelMetadata.IsCollectionType`
- correct doc comments for `ModelMetadata.RealModelType`
- add doc comments for `IsCollectionType`-related properties and methods
- add doc comments for `IsComplexType`-related properties and methods
- move `CachedModelMetadata.IsComplexType` right below `IsCollectionType`
 - same for related fields and methods
2015-02-13 15:28:45 -08:00
Doug Bunting 451db6fb16 React to aspnet/Razor#164: Camel-case tag helper directives 2015-02-13 12:07:21 -08:00
Ajay Bhargav Baaskaran 088bb18eed Added support for binding FormCollection
- Added FormCollectionModelBinder
 - Added relevant unit and functional tests
2015-02-13 11:14:50 -08:00
Pranav K a33e83f363 Adding IView.Path and ViewContext.ExecutingPagePath
Fixes #1940
2015-02-13 06:12:15 -08:00
Pranav K 29c346ebf8 Remove do-deep-clean and rely on Universe to clean on build on the CI 2015-02-12 22:21:34 -08:00
Pranav K 77947d1cb5 Fixing System.IO version 2015-02-12 22:20:28 -08:00
Doug Bunting 3ced6016a1 Deep copy user's select list before making changes
- #524
- add tests of `DropDownList` and `ListBox` HTML helpers
- extend tests of `<select/>` tag helper
- add scenario to a functional test

New `HtmlHelperSelectTest` does not cover everything. In future (see #453):
- use non-`null` `optionLabel` and `htmlAttributes` arguments
- confirm value sources and their priorities
- mock an `IHtmlGenerator` and confirm how it is called
- mock an `IHtmlHelper` and confirm how extension methods call that
2015-02-12 20:56:53 -08:00
Pranav K 0d1b35b6ec Run deep-clean on the CI prior to building 2015-02-12 14:58:19 -08:00
Pranav K 2169ba0c8f Reacting to ANIs going away 2015-02-12 14:52:17 -08:00
Brice Lambson 057959a786 Remove assembly-neutral interfaces 2015-02-12 13:35:27 -08:00
Doug Bunting ca65b1b6ed Correct recent checkins
- correct typo in 3303286288
 - really seal `CachedModelMetadata.Properties`
- make a couple of test methods `public` (!!)
- add Microsoft.AspNet.PageExecutionInstrumentation to Mvc.sln
- remove `<RootNamespace/>`, `<ProjectExtensions/>`, etc. from .kproj files
2015-02-12 08:53:17 -08:00
Pranav K 5ed0638402 Move PageExecutionListener interfaces to a separate assembly. 2015-02-11 18:06:20 -08:00
Pranav K f89c716dba Fixing build break 2015-02-11 17:54:04 -08:00
Ajay Bhargav Baaskaran 13e1c9d5e1 added InputFormatter base type 2015-02-11 16:48:56 -08:00
Pranav K e1e43e1e8c ControllerActivator should be able to use controllers registered as
services

* Added WithControllersFromServiceProvider that replaces the default
  controller activator with a service based one.
* Move activation to DefaultControllerFactory
* Modify [Activate] behavior so that it no longer activates services. Use
  [FromService] attribute to hydrate services

Fixes #1707
2015-02-11 16:41:59 -08:00
Ryan Nowak 7cb6c1065c Fix for #1913 - Improve attribute route link generation for areas
Attribute route link generation will now have a slight preference for
entries that can use ambient values (vs ignoring an ambient value). This
means that areas will be more 'sticky' with regard to link generation
without the need to specify a better Order.
2015-02-11 15:59:48 -08:00
Ryan Nowak 1721d90065 Fixes for changes in routing
Routing now requires the RouteOptions in the service provider.
2015-02-11 15:58:47 -08:00
Doug Bunting 731722ae36 Add `deep-clean` to `verify` target
- help CI machines with directory cleanup
- this target is not normally used except on CI machines
2015-02-11 14:45:22 -08:00
Doug Bunting 7e166295ba Simplify `<select/>` tag helper `multiple` attribute handling
- #1516
- `allowMultiple == true` when model has a collection type
 - ignore any `multiple` attribute in Razor source when generating element
- simplify tests too: fewer error cases

Note Razor author could allow browser user to submit values model binding
will likely ignore: Could mix a `multiple` attribute with a non-collection
`asp-for` expression.
2015-02-10 19:01:30 -08:00
Yishai Galatzer dd3f67c93f Update dictionary initializer in ScriptTagHelperTest to C#6 2015-02-10 18:12:20 -08:00
Ryan Nowak 7d56399702 xml doc fix 2015-02-10 16:54:27 -08:00
Ryan Nowak b4d1eec87a Makes attribute routing respond to AD updates
This change makes the attribute route capable of responding to updates in
the action descriptor collection.

The change moves the actual route implementation to InnerAttributeRoute.
AttributeRoute now wraps an InnerAttributeRoute - when processing a route,
AttributeRoute will now check with action descriptor collection if its
InnerAttributeRoute is still 'current' and rebuild it if necessary.
2015-02-10 16:01:22 -08:00
Mugdha Kulkarni 09b0aa5182 fixing a build break due to change in the error message in Routing 2015-02-10 14:46:40 -08:00
Pranav K db0841d00d Fixing xml doc comment in ApplicationModelConventionExtensions.cs 2015-02-10 14:03:34 -08:00
Pranav K 70ce04ff21 Results of parsing _ViewStart files should be cached
Fixes #1016
2015-02-10 13:48:33 -08:00
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