Commit Graph

4592 Commits

Author SHA1 Message Date
Pranav K f80490f99d
Remove runtime compilation from Mvc.Razor (#8755)
* Remove runtime compilation from Mvc.Razor
* Remove RazorViewEngineOptions.FileProviders
2018-11-21 17:14:12 -08:00
Nate McMaster bfdecc8f5e
React to the deprecation of Microsoft.AspNetCore.All (aspnet/Mvc#8751) 2018-11-20 17:36:47 -08:00
Ryan Nowak 1521f9298b Relayer action discovery infrastructure
This change introduces a service facade for creating the application
model, running conventions, validating the result, and flattening the
model.

This is used in the ControllerActionDescriptorProvider and provides the
existing functionality for now. The ControllerActionDescriptorProvider
will process the results and turn each 'flattened' model into a single
action descriptor.

The next change will introduce another consumer of this service, that
turns the 'flattened' model into an EndpointModel so that it can be
exposed via Endpoint Routing's convention system.

---

The main considerations here:

The flattening semantics of application model are pretty complicated :(

The validation that CADP does is actually pretty in depth and might be
really low value... Errors with writing route templates do happen, and
those will be caught by the routing system eventually.... Errors with
duplicate route names are similar... Errors with 'mixed' attribute and
conventional routing are not at all common. I don't think I've ever seen
an issue get filed about this. I did the work to port all of this stuff
forward but I'm not totally sure it's valuable - however, I don't really
want to make an argument for its removal. These are just some random
thoughts to keep in mind if you're reviewing this 👍
2018-11-20 11:03:37 -08:00
Pranav K 5a6d438f7b API review feedback for pubinternal type changes 2018-11-20 10:50:37 -08:00
Doug Bunting 3fe61d6601 Make Microsoft.Extensions.ApiDescription.Design experimental
- `$(ExpermentalPackageVersion)`, `$(ExpermentalVersionPrefix)` and `$(ExpermentalVersionSuffix)` were not used
2018-11-19 16:18:28 -08:00
Ben Adams 2414db256f Zero cost(ish) diagnositcs when disabled
Inlinable fast-path check if Diagnositcs is enabled
2018-11-18 15:47:55 -08:00
Alexej Timonin 98c10b6879 Add PageRemoteAttribute (#8324)
* Add PageRemoteAttribute

Fixes https://github.com/aspnet/Mvc/issues/8245
2018-11-18 09:30:23 -08:00
Pranav K d603735818 Ignore empty keys in QueryStringValueProvider
Fixes 8484
2018-11-18 09:09:01 -08:00
Doug Bunting 1da7a89f59 Add `ErrorContext.Member` to `ErrorContext.Path` when clearly needed
- #8509

nits:
- use `ModelNames.CreatePropertyModelName(...)`
- move `exception` assignment up and reuse that variable
2018-11-16 16:30:43 -08:00
Nate McMaster f5aae26b44
Update projects and packages to target netcoreapp3.0 (aspnet/Mvc#8734) 2018-11-16 16:28:35 -08:00
Javier Calvarro Nelson 7c68233125
Capture dumps on hanging CI builds (#8727)
* Update the build definition on VSTS pipelines to use a custom build script.
* Create a build script that starts a powershell job in the background
  that sleeps for 20 minutes and captures dumps for dotnet.exe and testhost.*.exe
  when it awakes if the build is still running.
2018-11-15 13:28:46 -08:00
James Newton-King 6270ea48a6
Refactor MVC endpoint integration for templates (#8695) 2018-11-15 17:04:26 +13:00
Pranav K 9ff5a441f5 Use 3.0 configuration in RCLs 2018-11-14 15:29:26 -08:00
Doug Bunting a96b5cf5f8 Quick fix: Correct benchmark apps' branches 2018-11-13 15:56:55 -08:00
Javier Calvarro Nelson bf8058da25
Switch from async void to async Task (#8722) 2018-11-13 12:26:08 -08:00
James Newton-King 5ed7658bf2
Fix routing tests (#8718) 2018-11-13 11:01:36 +13:00
Doug Bunting 8308d94e39
Quick fixes: Make `dotnet-getdocument` more reliable (#8716)
- use `WaitAny(...)` in inside man
- call `Process.WaitForExit()` twice
- `Flush()` all output `FileStream`s before disposal
- catch `UnauthorizedAccessException` when calling `File.Delete(...)` in case file's in use
- add `/nr:false` to `dotnet msbuild` command line
2018-11-12 11:26:02 -08:00
Pranav K 195a22d92c Move pubinternal to internal in CORS, DataAnnotations, Formatters, TagHelpers 2018-11-12 10:27:26 -08:00
Pranav K fcf5593813 Remove additional exe produced as part of updating to 3.0 SDK
Fixes https://github.com/aspnet/Mvc/issues/8681
2018-11-09 15:52:58 -08:00
Pranav K f734efe2e7 Move pubinternal types in Mvc.Razor and Mvc.RazorPages to internal 2018-11-09 15:00:38 -08:00
Pranav K ecb7edadc8 Remove WebApiCompatShim 2018-11-09 14:32:28 -08:00
Pranav K b18526cdc8 Make types in Microsoft.AspNetCore.Mvc.ViewFeatures internal 2018-11-09 11:14:19 -08:00
Pranav K be220e8bc2 Remove test verifying orders 2018-11-09 09:45:17 -08:00
Pranav K 8d66f104f7 Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal 2018-11-08 14:00:16 -08:00
James Newton-King 9f1a222d90
React to AuthorizationMiddleware (#8697) 2018-11-09 07:11:55 +13:00
Pranav K 65af12f1f5 Update Sdk \ KoreBuild to one that works 2018-11-05 17:17:17 -08:00
Pranav K 7ea301cc0a Fix RazorRendering 2018-11-01 19:19:59 -07:00
Ryan Nowak 6c3ae2ff9e fix RazorRendering build 2018-10-31 21:43:11 -07:00
Pranav K 17ed44c868
React to Razor.Design package removal (#8680)
* React to Razor.Design package removal

* Remove references to packages (Razor.Design, Razor.Extensions) solely used to bring in compiler \ targets
* Target netcoreapp3.0 in samples and tests to allow Sdk to infer values
2018-10-31 15:38:22 -07:00
Doug Bunting e4292c236c
Merge pull request #8682 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-31 14:47:16 -07:00
Doug Bunting a6199bbfba
Add integration and functional tests of `[BindRequired]` on page properties (#8677)
- #7353
2018-10-31 14:15:14 -07:00
Pranav K f2af66bc31
Cleanup InferParameterBindingInfoConvention (#8665)
* Cleanup InferParameterBindingInfoConvention

* Infer BindingSource for collection parameters as Body. Fixes https://github.com/aspnet/Mvc/issues/8536
* Introduce a compat switch to keep 2.1.x LTS behavior for collection parameters
* Do not infer BinderModelName in InferParameterBindingInfoConvention
2018-10-31 12:24:37 -07:00
Pranav K 54579f9bf5
Merge pull request #8673 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-31 09:46:33 -07:00
Doug Bunting 579341c8d6
Merge branch 'master' into merge/release/2.2-to-master 2018-10-30 21:08:15 -07:00
Doug Bunting c74a945dda
Convert `RouteValueDictionary` values to `string` using `CultureInfo.InvariantCulture` (#8674)
* Convert `RouteValueDictionary` values to `string` using `CultureInfo.InvariantCulture`
- #8578
- user may override this choice in one case:
  - register a custom `IValueProviderFactory` to pass another `CultureInfo` into the `RouteValueProvider`
- values are used as programmatic tokens outside `RouteValueProvider`

nits:
- take VS suggestions in changed classes
- take VS suggestions in files I had open :)
2018-10-30 20:09:17 -07:00
Pranav K 734b919b02 Respect SuppressInferBindingSourcesForParameters
Fixes https://github.com/aspnet/Mvc/issues/8657
2018-10-30 14:37:21 -07:00
Pranav K 16b15fcb2a
Merge pull request #8672 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-30 13:33:07 -07:00
Piotr Wosiek af6527dcef Fix XML doc on HttpMethodAttribute and derived ones 2018-10-30 13:21:15 -07:00
Pranav K 4015c9863e
Merge pull request #8664 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-29 12:54:42 -07:00
Pranav K 13cf754425
Merge pull request #8663 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-29 09:59:34 -07:00
Pranav K 35d2ab37f7 Allow passing a dictionary to ValidationProblemDetails
Fixes https://github.com/aspnet/Mvc/issues/8645
2018-10-29 09:56:17 -07:00
Pranav K ccde910b29 Specify TaskCreationOptions when using TCS
Fixes https://github.com/aspnet/Mvc/issues/8558
2018-10-29 09:33:05 -07:00
Doug Bunting 3f52894b1b
Merge pull request #8662 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-28 21:36:51 -07:00
Doug Bunting 0b6932dc15 Quick fix: Clean up test warnings
- avoid "Skipping test case with duplicate ID" messages
  - xUnit gets confused when `[Theory]`s are overridden
- avoid "falling back to single test case" messages
  - fix inspired by aspnet/SignalR#1820
2018-10-28 21:18:57 -07:00
Doug Bunting 0cea1b2a5f
Merge pull request #8656 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-10-27 16:53:19 -07:00
Doug Bunting 37e562902f Support single `IDocumentProvider` method signature
- #8593
- also find `IDocumentProvider` using a more-laborious process
  - `Type.GetType(string)` requires an assembly-qualified name and we don't know the assembly
- default method name now `GenerateAsync`
- only supported signature is `public Task GenerateAsync(string, TextWriter)`

also:
- handle more error cases in the tool's inside man
- avoid an empty document file if `IDocumentProvider.GenerateAsync(...)` fails
- unwrap an `AggregateException`

nits:
- remove duplicate comments
- change `GetDocumentCommandWorker.TryProcess(...)` to return `false` on failure
  - minor because return value is currently ignored
- rename `GetDocumentCommandContext.Output` -> `OutputPath`
- reflect recent change to `dotnet-getdocument`'s `Resources.resx` file in its designer file
2018-10-27 15:27:33 -07:00
James Newton-King 1a093686e6
Merge pull request #8653 from aspnet/jamesnk/master
Merge release/2.2
2018-10-27 12:31:37 +13:00
James Newton-King 1c61f3538e
Merge release/2.2 2018-10-27 11:56:04 +13:00
Pranav K ae50cd619f
Merge pull request #8651 from aspnet/prkrishn/master
Merge pull request #8641 from dotnet-maestro-bot/merge/release/2.2-to…
2018-10-26 12:15:34 -07:00
James Newton-King 6bb292cfcc
Add test for metadata precedence (#8642) 2018-10-27 07:59:15 +13:00