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 idea is to create a binding action that binds to all interfaces of a given type, like:
a class of name MyClass implements IInterface1, IInterface2, IInterface3.
to bind all of these interfaces to e.g. a singleton of MyClass, something like container.BindToInterfaces<MyClass>().ToSingleton<MyClass>() could be done.
The BindToInterfaces<T>() could receive classes or interfaces.
It could be also created a method that bounds to all inherited and implemented types of a given type.
The text was updated successfully, but these errors were encountered:
This issue could be improved by adding a To() and ToSingleton methods using anonymous functions with a type definition object, so it's possible to create custom To definitions.
The idea is to create a binding action that binds to all interfaces of a given type, like:
container.BindToInterfaces<MyClass>().ToSingleton<MyClass>()
could be done.The
BindToInterfaces<T>()
could receive classes or interfaces.It could be also created a method that bounds to all inherited and implemented types of a given type.
The text was updated successfully, but these errors were encountered: