Commit Graph

44299 Commits

Author SHA1 Message Date
Levi B 0dd3a49463 Perf: Eliminate chatty virtual dispatches
This gives a speedup of approx. 20% (for overloads which take TextWriter) to 40% (for overloads which don't take TextWriter) for inputs in which at least one character requires encoding.
2015-02-12 11:44:11 -08:00
Praburaj f243244972 Adding ability to turn off the status code pages
Added a feature named IStatusCodeFeature with an enabled property. MVC or any framework can get this feature and turn it off if
it does not want status code pages logic to take over and send HTML response.

Also refactored the sample flow to make it easier to understand.
2015-02-12 11:09:47 -08:00
Pranav K 26cd8d51b6 Removing ANIs 2015-02-12 09:07:47 -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
Hao Kung cd0acd7a47 API Review cleanup #1
- Remove constructor defaults
- Make service properties internal
- Add Logging/HttpContextAccessor services which are required by
identity
2015-02-12 02:21:33 -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
Levi B e5c6fd401f Add TextWriter-based overloads to the encoding routines
These make the core implementations slightly slower but
provide the benefit of reducing allocations, which is
useful when these methods are called frequently by Razor.
2015-02-11 17:49:37 -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
Ryan Nowak 9ee946073a Add support for best-effort link-generation
This change adds a feature needed for aspnet/Mvc#302

There's a new option in routing that allows link-generation to proceed
when the route values cannot be validated. The key scenario for this is
during development of an MVC site. Routing will refuse to generate a link
to actions which don't exists, this is a breaking change from the MVC5
behavior. Setting UseBestEffortLinkGeneration will allow routing to return
a value even when we can't match the action.

This option will remain off by default - setting this to on will impact
link-generation in a bunch of scenarios involving areas where we've
improved the logic for MVC6. If you're considering leaving this on outside
of development scenarios, then make sure to be as explicit with route values
as possible (don't rely on ambient values).

Functional tests to follow up in the MVC repo.
2015-02-11 14:38:30 -08:00
Levi B 14c872d981 Update HtmlEncoder to wrap UnicodeEncoderBase 2015-02-11 12:03:47 -08:00
Levi B fc7ed3a9cd Add TLS token binding feature 2015-02-11 11:40:40 -08:00
Levi B 1008e17259 Add HtmlEncoder, UrlEncoder, and JavaScriptStringEncoder
Also add interfaces for abstracting each of these
Unit tests are not in yet but are coming soon
2015-02-11 11:39:22 -08:00
Eilon Lipton dadd9cd9f3 Merge pull request #189 from ironyx/patch-1
Logical AND would never be true; broke into OR statement
2015-02-11 09:35:06 -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
Hao Kung 083f05a7d0 React to identity cancellationToken removal 2015-02-10 17:45:29 -08:00
Praburaj 31afaca7e3 Renaming some extensions to disambiguate ones with similar parameters. 2015-02-10 17:03:41 -08:00
Ryan Nowak 7d56399702 xml doc fix 2015-02-10 16:54:27 -08:00
Praburaj 686d517966 Updating extension names 2015-02-10 16:30:42 -08:00
Praburaj 23ef6d4eb8 Changing extensions from StatusCodePagesOptions to IApplicationBuilder.
Addressing few more PR comments.
2015-02-10 16:18:06 -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
Hao Kung 597e2b3153 Remove CancellationToken from Manager APIs 2015-02-10 15:39:42 -08:00
Praburaj 6850035d8e PR comments
Addressing some outstanding PR feedback.
2015-02-10 14:54:59 -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
David Haney 9e7fbde9f1 Logical AND would never be true; broke into OR statement 2015-02-10 17:41:06 -05: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
Chris Ross 6444f3e15d Move the reason phrase lookup to WebUtilities. 2015-02-10 13:29:59 -08:00
Chris Ross cd238d4545 Outline for StatusCodePages middleware. 2015-02-10 13:29:48 -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
Praburaj 04c6b1f101 Adding necessary dependencies to OpenIdConnect directly
OpenIdconnect project is betting on the dependencies included by Microsoft.IdentityModel.Protocol.Extensions for the types that are referenced directly in this library but not used in Protocol.Extensions library.

This change is to enable Wilson clean up its unused dependencies.
2015-02-10 11:25:30 -08:00
Mugdha Kulkarni 4e5fc2e2dd Fixing Routing Issue: 136
The RegEx inline constraint doesn't take care of Escape characters.
2015-02-10 11:16:30 -08:00
Brice Lambson a09d8a4ead React to Migrations changes 2015-02-10 11:07:18 -08:00
David Fowler bb2352c638 Remove build time deps and fixed formatting 2015-02-10 11:01:03 -08:00
David Fowler 0354345c9c Removed build time deps and fixed dependencies 2015-02-10 10:50:41 -08:00
David Fowler f6e049ff85 Removed the build time dependency and added a reference to Hosting.Interfaces 2015-02-10 10:27:41 -08:00
David Fowler e8d9414d92 Removed build time dependency 2015-02-10 10:08:16 -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
David Fowler 6208698a5c Added Microsoft.AspNet.Hosting.Interfaces package 2015-02-09 22:10:29 -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