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
It would be useful if the provide... functions would accept multiple tokens. This would be useful for describing interfaces that are implemented in an aggregate concretion, for example:
In this way, consumers can specify the interface they want, and get a concretion which provides that, even if it provides other things we don't care about.
At present we can specify multiple provide... calls, but in this case, the instance/value will be created for each token specified by a consumer, where we might actually intended to have a singleton or transient scope. Whilst it would be possible to provide a factory that deals with this, its somewhat obtuse and repetitive if we want to use the pattern extensively.
The text was updated successfully, but these errors were encountered:
It would be useful if the
provide...
functions would accept multiple tokens. This would be useful for describing interfaces that are implemented in an aggregate concretion, for example:In this way, consumers can specify the interface they want, and get a concretion which provides that, even if it provides other things we don't care about.
At present we can specify multiple
provide...
calls, but in this case, the instance/value will be created for each token specified by a consumer, where we might actually intended to have a singleton or transient scope. Whilst it would be possible to provide a factory that deals with this, its somewhat obtuse and repetitive if we want to use the pattern extensively.The text was updated successfully, but these errors were encountered: