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
I often use multi-binding where I want to use DI to create instances of the sequence -- hence I can't bind instances directly to the sequence key. My workaround is the utility class below, but it feels like this should be built into the framework (esp. since ListOfProviders is markes @Private)
binder.multibind(Test.SEQ_KEY, ClassProviderList([MyClass])) # Not an instance.classClassProviderList(ListOfProviders):
def__init__(self, classes):
super(ClassProviderList, self).__init__()
forclsinclasses:
self.append(ClassProvider(cls))
The text was updated successfully, but these errors were encountered:
I often use multi-binding where I want to use DI to create instances of the sequence -- hence I can't bind instances directly to the sequence key. My workaround is the utility class below, but it feels like this should be built into the framework (esp. since ListOfProviders is markes @Private)
The text was updated successfully, but these errors were encountered: