-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hey!
I was wondering if there's a way to register decorators in a “SimpleInjector-ish” way?
For example, like:
type SomeCommandHandler = CommandHandler<SomeCommand>
class SomeHandler implements SomeCommandHandler { /*...*/ }
class WithLogger implements SomeCommandHandler { /*...*/ }
class WithProfiler implements SomeCommandHandler { /*...*/ }
container.registerSingleton<SomeCommandHandler, SomeHandler>();
container.registerDecorator<SomeCommandHandler, WithLogger>();
container.registerDecorator<SomeCommandHandler, WithProfiler>();I tried searching the docs and playing with “workarounds” by renaming types for decorators but didn't find anything that would work and look nicely.
P.S. Thanks for the library! :–)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels