Commit Graph

2181 Commits

Author SHA1 Message Date
Ryan Nowak 1474ed8fe8 Fix breaks to xml docs 2015-10-20 23:31:02 -07:00
Ryan Nowak 3576939457 Fix break in XmlSerializerOutputFormatter tests
The wrong type is being passed in to the wrapper-provider for
XmlSerializer. DCS formatter is already correct.
2015-10-20 22:25:56 -07:00
Ryan Nowak 800e46eed4 Fix failures in StringOutputFormatter functional tests
The missing piece here is is that StringOutputFormatter needs to set the
ContentType so that it gets overridden. The problem is that the formatter
is likely called with something like application/json, but decides to
write a string anyway. So because we're saying 'yes we can write' we also
need to override what we're writing.
2015-10-20 22:12:21 -07:00
Eilon Lipton 55b72c04bf Add high-pri doc comments for views, controllers, HTML helpers, Startup 2015-10-20 18:24:56 -07:00
Ryan Nowak 38b65875db Refactor of OutputFormattterContext 2015-10-20 18:05:57 -07:00
Ryan Nowak d584bcabcf React to changes in Authz 2015-10-20 17:45:02 -07:00
Pranav K 8b0c157296 Rename ModelState (the type) -> ModelStateEntry
Fixes #3326
2015-10-20 16:43:00 -07:00
Ryan Nowak 173f00fda7 Update to use DiagnosticSource 2015-10-20 11:47:29 -07:00
Ryan Nowak 054b39013c Reduce allocations in MSD enumeration 2015-10-20 10:35:16 -07:00
Ryan Nowak 6985015e2d Fix test breaks in WebAPI shim
This hasn't hit universe yet, but these needed to change with the
ObjectResult refactor
2015-10-19 18:00:02 -07:00
Kirthi Krishnamraju 82cba7c0b2 react to aspnet/localization #90 2015-10-19 16:15:57 -07:00
Ryan Nowak 06cc58663e Move implementation of ObjectResult into a facade 2015-10-19 11:56:03 -07:00
Ajay Bhargav Baaskaran 6bd97c7c30 Moving AllowAnonymous attribute to Authorization 2015-10-19 11:01:15 -07:00
Pranav K f4a6d634b5 Modify ViewStartUtility to generate always view paths with forward slashes
Fixes #3294
2015-10-19 10:33:05 -07:00
N. Taylor Mullen e943cdb57a React to aspnet/Razor#569 2015-10-16 15:09:31 -07:00
unknown 6a4da5d795 PhysicalFileResult throws NotSupported on path not rooted 2015-10-16 13:31:52 -07:00
Ryan Nowak 32645e93c8 Add expression rewriting to Razor
This change rewrites simple and safe Expression<Func<T, U>> expressions
into accesses to readonly fields. This allows us to cache the actual
expression and avoid repeatedly allocating and compiling it.

The rewrite is limited to cases where we know that the expression doesn't
capture, and where we support that kind of expression for evaluating
viewdata. In practice this means 'indentity' and property accessors are
allowed.
2015-10-16 12:28:50 -07:00
Ajay Bhargav Baaskaran 6ef2fe44ca [Fixes #3250] Remove RouteGroup from RouteValues 2015-10-16 10:57:22 -07:00
Doug Bunting 9b004611e5 Address PR comments for 2e2043f (PR #3317)
- remove redundant `null` check in `InputFormatter`
- improve comments
- rename `ObjectResult.SelectFormatterBasedOnTypeMatch()` -> `SelectFormatterNotUsingAcceptHeaders()`
2015-10-15 20:26:03 -07:00
Kiran Challa fbf66168fe React to Cors api review changes 2015-10-15 13:05:08 -07:00
Hao Kung fd17481a73 React to AuthZ changes 2015-10-14 17:04:31 -07:00
Pranav K 2dcec8fe51 React to Kestrel package rename
Fixes #3323
2015-10-14 16:39:13 -07:00
Ajay Bhargav Baaskaran d40e6612a4 Moving the order of generated hidden tags for checkbox to end of the form
- #2994
- Affects both HtmlHelper and TagHelper scenarios
- Checkboxes not enclosed in a form will generate inline hidden tags
- Added necessary properties to FormContext
- Added some functional and unit tests
2015-10-14 15:43:13 -07:00
Doug Bunting 03625c38af Correct polarity of MediaTypeHeaderValue.IsSubsetOf()` checks and remove one conneg fallback
- aspnet/Mvc#3138 part 2/2
- request's Content-Type header must be a subset of what an `IInputFormatter` can consume
  - `[Consumes]` is similar
- what an `IOutputFormatter` produces must be a subset of the request's Accept header
  - `FormatFilter` and `ObjectResult` are similar
- `ObjectResult` no longer falls back to `Content-Type` header if no `Accept` value is acceptable
- left `WebApiCompatShim` code alone for consistency with down-level `System.Net.Http.Formatting`
- correct tests to match new behaviour
  - do not test `Accept` values containing a `charset` parameter; that case is not valid

WIP:
- four test failures; something about comparing media types w/ charset included
- why do some localization tests fail in VS?

nits:
- add `InputFormatterTests`
- add / update comments and doc comments
- correct xUnit attributes in `ActionResultTest`; odd it doesn't show up in command-line runs
2015-10-14 11:59:20 -07:00
Doug Bunting 2e2043f427 Test `[FromServices]` with service that is not available
- test `[FromServices]` for a defined type without a `BinderModelName`
- test `[FromServices]` for a service not available in DI
- test `[FromServices]` for `IEnumerable<TService>` properties

nit: correct name of `ServicesModelBinderTest` to match the model binder class
2015-10-14 11:46:11 -07:00
Doug Bunting 9aed5efd51 Add `null` checks for MVC tag helpers 2015-10-14 11:27:25 -07:00
Doug Bunting c3ac457c20 Fix local build break 2015-10-12 12:59:16 -07:00
Pranav K 0309a5216c Add an option to RazorPrecompileModule to allow conditional compilation
based on Configuration.

Fixes #3276
2015-10-12 11:59:55 -07:00
Chris R 6e347724b5 React to IHeaderDictionary changes. 2015-10-12 11:38:24 -07:00
Doug Bunting 5a1c120392 React to aspnet/Universe#290 fix 2015-10-12 10:42:45 -07:00
Doug Bunting 35d176f5b2 Update DNX Core on Linux workarounds
- remove skip conditions for aspnet/External#33, aspnet/External#41, aspnet/External#42, aspnet/External#43
- add workaround for aspnet/External#47; avoid "g" custom datetime format specifier
- make tag helper execution order determinate in `TagHelpersWebSite`

Will test DNX Core in Travis builds (use `--test-dnxcore`) once aspnet/Universe#290 fix is in.

nits:
- remove useless `using`s for `Microsoft.AspNet.Razor.TagHelpers`
2015-10-10 23:09:51 -07:00
Ryan Nowak 9342cb0ab7 Suppress [Obsolete] warnings from DiagnosticSource 2015-10-08 12:47:08 -07:00
Pranav K 91cb6281e4 Using @inherits and @model together gives intellisense errors
Fixes #3243
2015-10-08 11:02:20 -07:00
Pranav K 18912b9530 Removing NotNullAttribute.Sources references that were left behind 2015-10-06 17:36:46 -07:00
Pranav K 30f5826380 Use Type.GetMethod in ViewComponentMethodSelector
Fixes #3211
2015-10-06 16:21:56 -07:00
Ryan Nowak d9e40d92de Make ModelPropertyCollection inherit ReadOnlyCollection<T>
Just some small cleanup. Did a search and all of our other custom List-ish
things inherit either Collection<T> or ReadOnlyCollection<T>.

Still no good solution for dictionaries.
2015-10-06 14:43:02 -07:00
Ryan Nowak 0dadf56fc8 Reducing allocations in value providers
- Don't go async in formdata providers unless we need to
- Remove unnecessary defensive copy in CompositeValueProvider
2015-10-06 14:25:19 -07:00
Ryan Nowak 082f175b48 Optimize allocations in GetFilters
Doing it the old fashioned way to get rid of some allocations.
2015-10-06 13:41:44 -07:00
Ryan Nowak e54da5e6f6 Remove dead code in invoker (SetStage) 2015-10-06 13:28:33 -07:00
Ryan Nowak 761c7e6751 Optimize allocations for creating ActionConstraints 2015-10-06 12:35:13 -07:00
Ryan Nowak 1ed22e5939 Avoid state machine and allocation for 0-parameters 2015-10-06 12:02:49 -07:00
Pranav K 04d72d8894 Simplify FileResult
Fixes #3249
2015-10-06 11:26:56 -07:00
Ryan Nowak 04c6fceb94 React to aspnet/Routing#215 2015-10-06 10:37:56 -07:00
Pranav K a602d548e2 Allow ViewFeature tests to run in dnxcore50 2015-10-06 09:46:49 -07:00
Anthony van der Hoorn a0764faa86 Bring arguments inline between before/after events 2015-10-05 16:42:25 -07:00
Ryan Nowak 32c174c791 CR feedback from attribute dictionary 2015-10-05 10:38:46 -07:00
Ryan Nowak ad3c257ef5 Fix for #3252 - Issues with pooled buffer + unicode
- Dispose buffers when Flush throws inside the Dispose method
- Compute size of buffers correctly
- Throw earlier when handed invalid-sized buffers
2015-10-05 09:45:23 -07:00
Pranav K f57e180971 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:53 -07:00
Pranav K 8d7b95655d Removing Autofac dependency 2015-10-03 12:18:19 -07:00
Ryan Nowak 6185b16795 Custom dictionary type for attributes 2015-10-02 18:08:58 -07:00