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 👍
* 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.
- 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
* 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
* 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
* 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 :)
- 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
- #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