We spoke on discord about this.
Currently the lifetime of handlers can be configured when registering them into the DI container like so:
services.AddXxxHandlers(lifetime = ServiceLifetime.Scoped)
But there is currently no way to override this setting on a per handler basis. For example, say I wanted to default my handlers to scoped but make a specific handler a transient instead. I'm imagining an argument to the attribute like [Handler(ServiceLifetime.Transient)] or something along those lines.
We spoke on discord about this.
Currently the lifetime of handlers can be configured when registering them into the DI container like so:
services.AddXxxHandlers(lifetime = ServiceLifetime.Scoped)But there is currently no way to override this setting on a per handler basis. For example, say I wanted to default my handlers to scoped but make a specific handler a transient instead. I'm imagining an argument to the attribute like
[Handler(ServiceLifetime.Transient)]or something along those lines.