To support frameworks built on top of ASP.NET Core WebHooks, make WebHook constraints aware of ActionDescriptor.RouteValues. This will enable higher-level frameworks to use route templates lacking {webHookReceiver} and {id?} parameter route values.
Suggest preferring RouteData.Values i.e. use WebHookRouteDataExtensions.TryGetWebHookReceiverName(...) and TryGetWebHookReceiverId(...) first. Fall back to ActionDescriptor.RouteValues.
(This extension is not necessary in WebHook filters because ActionDescriptor.RouteValues are added to RouteData.Values after the route is chosen.)
To support frameworks built on top of ASP.NET Core WebHooks, make WebHook constraints aware of
ActionDescriptor.RouteValues
. This will enable higher-level frameworks to use route templates lacking{webHookReceiver}
and{id?}
parameter route values.Suggest preferring
RouteData.Values
i.e. useWebHookRouteDataExtensions.TryGetWebHookReceiverName(...)
andTryGetWebHookReceiverId(...)
first. Fall back toActionDescriptor.RouteValues
.(This extension is not necessary in WebHook filters because
ActionDescriptor.RouteValues
are added toRouteData.Values
after the route is chosen.)