-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Introduce dynamic endpoints and fix #7011 #7445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageLoaderMatcherPolicy.cs
Outdated
Show resolved
Hide resolved
83a00c2
to
7c2c50d
Compare
@JamesNK @pranavkm - Updated and added some stuff. So once I got all of this working, I realised that I had a problem because use the invoker factory from page loader creates a DI cycle. This is just a general thing we should try to avoid - ideally MVC doesn't need to construct the entire runtime just to do action discovery. To resolve this I had to disentangle a few things... ahem removing |
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionEndpointFactory.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/CompiledPageActionDescriptor.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageActionInvokerProvider.cs
Show resolved
Hide resolved
src/Mvc/test/Microsoft.AspNetCore.Mvc.Core.Test/Routing/ActionEndpointFactoryTest.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionEndpointFactory.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/ActionContextAccessor.cs
Outdated
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageActionDescriptorProvider.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageLoaderMatcherPolicy.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionEndpointFactory.cs
Outdated
Show resolved
Hide resolved
7c2c50d
to
15d6526
Compare
@JamesNK ping |
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Routing/ActionEndpointFactory.cs
Show resolved
Hide resolved
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/CompiledPageActionDescriptor.cs
Show resolved
Hide resolved
Thanks chaps! |
Introduces a pattern for matcher policy that replaces endpoints during matching.
This allows you to uses the matcher's URL processing, but then run arbitrary other code to choose your own endpoint.