Example #1
0
 def configure(self, binder):
     dictbinder = DictBinder(binder, ISnack)
     dictbinder.add_binding('lays', to=Lays)
     provider = providers.create_simple_provider(Tostitos)
     dictbinder.add_binding('tostitos', to_provider=provider)
     dictbinder.add_binding('ruffles', to_instance=Ruffles())
Example #2
0
 def configure(self, binder):
     dictbinder = DictBinder(binder, ISnack)
     dictbinder.add_binding('twix', to=Twix)
     provider = providers.create_simple_provider(Snickers)
     dictbinder.add_binding('snickers', to_provider=provider)
     dictbinder.add_binding('skittles', to_instance=Skittles())
Example #3
0
 def configure(self, binder):
     dictbinder = DictBinder(binder, ISnack, annotated_with='FritoLaySnackMachine')
     provider = providers.create_simple_provider(Tostitos)
     dictbinder.add_binding('Tostitos', to_provider=provider, in_scope=scopes.SINGLETON)
     dictbinder.add_binding('Ruffles', to_instance=Ruffles(), in_scope=scopes.SINGLETON)
Example #4
0
 def configure(self, binder):
     listbinder = DictBinder(binder, ISnack)
     listbinder.add_binding('Lays', to=Lays, in_scope=scopes.SINGLETON)
     provider = providers.create_simple_provider(Tostitos)
     listbinder.add_binding('Tostitos', to_provider=provider, in_scope=scopes.SINGLETON)
     listbinder.add_binding('Ruffles', to_instance=Ruffles(), in_scope=scopes.SINGLETON)
 def configure(self, binder):
     dictbinder = DictBinder(binder, ISnack)
     dictbinder.add_binding('lays', to=Lays)
     provider = providers.create_simple_provider(Tostitos)
     dictbinder.add_binding('tostitos', to_provider=provider)
     dictbinder.add_binding('ruffles', to_instance=Ruffles())
 def configure(self, binder):
     dictbinder = DictBinder(binder, ISnack)
     dictbinder.add_binding('twix', to=Twix)
     provider = providers.create_simple_provider(Snickers)
     dictbinder.add_binding('snickers', to_provider=provider)
     dictbinder.add_binding('skittles', to_instance=Skittles())