Contextual classes (like JumpContext in the Sample application) need to be instantiated with Scoped lifetimes by the service provider... which means they have to be registered first. It's annoying having to register each one manually/individually in the ConfigureServices method. It would be nice to be able to decorate a class with a [RouteContextAttribute] or something and have these discovered/registered automatically when we call AddCommandRouting().
Contextual classes (like
JumpContext
in the Sample application) need to be instantiated with Scoped lifetimes by the service provider... which means they have to be registered first. It's annoying having to register each one manually/individually in the ConfigureServices method. It would be nice to be able to decorate a class with a[RouteContextAttribute]
or something and have these discovered/registered automatically when we callAddCommandRouting()
.