You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `TopicRouteValueTransformer` provides flexible support for using the `MapDynamicControllerRoute<>()` extension method for configuring endpoints. This allows us to implicitly assign route variables if they're missing based on context.
Notably, if the `controller` is missing, but `area` is defined, it will set it to `area`, thus supporting an implicit controller convention. E.g., for `/Areas/Forms/Controllers/FormsController.cs`, we can simply route to `/Forms/`, without needing to explicitly define a route for each area along with a `default` controller.
Also, if `path` and `area` are defined, but our (custom) `rootTopic` variable is not defined, `rootTopic` will be set to `area`.
This is intended to provide support for upcoming extension methods to simplify associating OnTopic routes with areas—something which is currently done manually, but which is both verbose and potentially error prone. Further, doing so mandates individual routes to be setup for implicit controllers, whereas this provides wildcard support.
0 commit comments