Commit Graph

3566 Commits

Author SHA1 Message Date
Ryan Nowak 8d9c16132a Fix #6479 - remove IFileProvider constructor
The RazorProject implementation used by MVC at runtime has a constructor
that takes an IFileProvider (used by tests). This causes ambiguities
when a user registers an IFileProvider in DI.

Cleaning up tests to use a mock instead of the file provider directly
2017-07-04 13:48:56 -07:00
Ryan Nowak a23307e2b1 Check for properties that can't befound
If you give ModelExpressionProvider a lambda with a private property
you'll end up here. This wasn't common before, but it seems like users
are more likely to try it with pages.

Model Metadata and Model Binding don't handle private properties, so
supporting it in Model Expressions seems less than useful.

This isn't a breaking change because this case would have resulted in a
null-ref. Addresses #6400
2017-07-04 13:26:17 -07:00
Doug Bunting c351712419 Add `FloatingPointTypeModelBinderProvider` and related binders
- #5502
- support thousands separators for `decimal`, `double` and `float`
- add tests demonstrating `SimpleTypeModelBinder` does not support thousands separators for numeric types
- add tests demonstrating use of commas (not thousands separators) with `enum` values
2017-07-03 17:55:04 -07:00
Javier Calvarro Nelson c50f55d1de Add a default sliding expiration of 30 seconds on Memory and Distributed Cache Tag Helpers. 2017-07-03 17:06:47 -07:00
Ryan Brandenburg 057a853de7 DiagnosticSource to 4.4.1 2017-07-03 15:03:34 -07:00
Sébastien Ros 13e76c24d3 Dispose CancellationTokenSource created in CacheTagHelper (#6293)
Fixes #5649
2017-07-03 14:59:48 -07:00
Pranav K ca751c5297 Update LICENSE.txt text 2017-07-03 14:07:12 -07:00
Javier Calvarro Nelson 728b96344d [Fixes #6274] Fix and re-enable skiped test 2017-07-03 13:00:38 -07:00
Hao Kung eeee3ef731 Add SignOut overload + Use new auth api (#6476) 2017-07-03 12:32:11 -07:00
Javier Calvarro Nelson d917504c14 [Fixes #6468] Clean up the productionized testing infrastructure 2017-07-03 10:15:06 -07:00
Pranav K 7c5a16c105 Add RemoveType methods of PageConventionCollection 2017-06-30 16:27:51 -07:00
Pranav K bc4328de16 Add entry to breakingchanges.json 2017-06-30 15:44:21 -07:00
Henk Mollema 948982ebff Create custom collection for model binder providers
Fixes #6161
2017-06-30 15:44:07 -07:00
Nate McMaster 873a2fe17f React to changes in Antiforgery API 2017-06-30 15:20:44 -07:00
Pranav K bc86ea4e47 Move convention extensions from RazorPagesOptions to PageConventionCollectionsExtensions
Fixes #6462
2017-06-30 14:25:10 -07:00
Mike Harder 660b7df0e2 Upgrade Roslyn to 2.3.0-beta3-* 2017-06-30 12:17:58 -07:00
Doug Bunting f76a390a4e Fall back to linear search for prefix matches
- #6469
2017-06-30 10:59:07 -07:00
Doug Bunting 293ac81fe1 Use ordinal comparisons in `ExpressionTextCache`
- #6349
- C# field and property names are case-sensitive
  - it's not important (where this cache is used) that HTML field names are case-insenstive
2017-06-29 14:59:06 -07:00
Jass Bagga 17f6b17a6d Add RequestSizeLimitAttribute (#6453)
Addresses #6352
2017-06-29 13:04:27 -07:00
Ryan Nowak 579aca0121 Define semantics for pagemodels
Fixes #6210

Now a pagemodel requires a [PageModel] somewhere in it's hierarchy. We
don't do a guess at whether or not your model class is a PageModel.
2017-06-29 09:24:57 -07:00
Pranav K b95ea8bcd2 Add NETStandardImplicitPackageVersion 2017-06-29 08:39:43 -07:00
Doug Bunting a90f4118ad Do not include type names in `ModelState` error messages
- #6076
- add resources and accessors specifically for the element / parameter cases
- avoid `metadata.GetDisplayName()` where possible
- fill in the `ValidationContext` that `ValidatorObjectAdapter` uses
  - e.g. `Validate_NestedComplexType_IValidatableObject_Invalid()` test fails without this

Possible future work:
- improve error message used for `ModelMetadata.IsRequired` elements and parameters
- use something besides the type for `ValidationContext.DisplayName` of elements and parameters

nits:
- trailing whitespace
- use more `out var`
2017-06-28 15:16:23 -07:00
Pranav K 8df3032540 Add support for specifying filters on page models.
Fixes #6334
2017-06-28 14:43:02 -07:00
Henk Mollema 7166dfecd7 Add generic overloads on FilterCollection 2017-06-28 09:03:48 -07:00
Ryan Nowak 1886d53d89 Remove [BindProperty] on class
This isn't a good fit with consistency with controllers. Discussed with
@DamianEdwards and we agreed to remove this for now and bring it back in
the future if there's a real need for it.
2017-06-28 08:18:42 -07:00
Nate McMaster 12ea28af5c React to API change in HttpAbstractions 2017-06-27 17:33:46 -07:00
Pranav K 9acfc8d221 Watch _ViewImports outside the pages root for changes
Fixes #6428
2017-06-27 09:30:07 -07:00
Pranav K d278d6eedf Updating Moq to 4.7.49 2017-06-27 09:04:45 -07:00
Pranav K d1813a7cd7 Normalize paths returned by view location expanders
Fixes #6448
2017-06-27 08:48:07 -07:00
Ryan Nowak 3536cf5aad Fix #5183 - update docs of CreateWriter 2017-06-26 18:59:36 -07:00
Ryan Nowak 0ad9c7d4eb Making Pages Binding Consistent
This changeset reckonciles the binding work we did for pages with
controllers.

A quick summary:
- Moves [BindProperty] to the MVC namespace (#6401)
- Makes [FromRoute] and friends behave consistently (#6402)
- Makes [BindProperty] work with controllers (untracked)
2017-06-26 18:11:44 -07:00
Hao Kung cf09af52eb Remove duplicate type 2017-06-26 16:32:51 -07:00
Hao Kung 4e004c22ba React to options 2017-06-26 15:49:23 -07:00
Jass Bagga f4a86f5511 Add DiagnosticSource to RazorView (#6386)
Addresses #6222
2017-06-26 15:35:31 -07:00
Pranav K e5da44a82f Generate full pdbs for views on desktop and re-enable runtime error tests (#6442)
* Generate full pdbs for views on desktop and re-enable runtime error tests

StackTraceHelper \ PortablePdbReader used by Diagnostics is only useful for
reading portable pdbs on disk. However pdbs produced by views are entirely
in memory and therefore cannot be read. Consequently
we choose to generate full pdbs for views on Windows (when possible).
2017-06-26 10:46:12 -07:00
Javier Calvarro Nelson 03e555a24e Fix packing issue 2017-06-23 19:43:04 -07:00
Javier Calvarro Nelson 052db40567 Fix documentation and target files issues 2017-06-23 19:09:45 -07:00
Javier Calvarro Nelson 35152d5933 [Fixes #6233] Productionize and harden our functional testing infrastructure 2017-06-23 18:12:41 -07:00
Pranav K aa5a348385 _ViewStart.cshtml not picked up when added to the root of the app
Fixes #6308
2017-06-23 08:25:58 -07:00
Pranav K 0dfffd45c2 RazorPages page directives missing quotes should alert user
Fixes #5868
2017-06-22 15:13:38 -07:00
Jass Bagga 9d138affa2 Suppress JsonPatchDocument validation (#6429)
Addresses aspnet/JsonPatch#80
2017-06-22 14:14:11 -07:00
Ryan Nowak de64c84610 React to RazorIRNode renames 2017-06-21 13:44:58 -07:00
N. Taylor Mullen 53fb676069 React to new page directive expectations.
- This will be reverted once https://github.com/aspnet/Razor/issues/1448 has been completed.
2017-06-20 12:53:23 -07:00
Pranav K c89f0a1e43 Allow AddPageRoute to route to pages root. (#6412)
* Allow AddPageRoute to route to pages root.
Fixes #6338
2017-06-20 12:33:33 -07:00
Pranav K f824704741 Cleanup fileLength use 2017-06-18 11:05:49 -07:00
Kiran Challa 3fc3d8d060 Merge branch 'rel/2.0.0-preview2' into dev-gate 2017-06-15 03:48:49 -07:00
Kiran Challa 0c6460ab64 Changed WebApiCompatShim projects to use PackageTargetFallback 2017-06-14 16:08:04 -07:00
Ryan Brandenburg 8832014516 PackageTarget->AssetTarget 2017-06-14 15:03:43 -07:00
Ryan Nowak 4a374f8a33 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-14 12:06:47 -07:00
Ryan Nowak e14ab8f396 Revert "Revert "Update Roslyn dependency for C# 7.1""
This reverts commit 8fb5652f0a.
2017-06-14 12:00:47 -07:00