Skip to content

Commit

Permalink
(chocolateyGH-14) Container registration
Browse files Browse the repository at this point in the history
Add the source runners configuration
  • Loading branch information
ferventcoder committed Jun 4, 2015
1 parent 0f12556 commit e2c0a59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/chocolatey/infrastructure.app/registration/ContainerBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ public void RegisterComponents(Container container)
};
return list.AsReadOnly();
}, Lifestyle.Singleton);

container.Register<IEnumerable<ISourceRunner>>(() =>
{
var list = new List<ISourceRunner>
{
container.GetInstance<INugetService>(),
new WebPiService(container.GetInstance<ICommandExecutor>(),container.GetInstance<INugetService>())
};
return list.AsReadOnly();
}, Lifestyle.Singleton);

container.Register<IEventSubscriptionManagerService, EventSubscriptionManagerService>(Lifestyle.Singleton);
EventManager.initialize_with(container.GetInstance<IEventSubscriptionManagerService>);
Expand Down

0 comments on commit e2c0a59

Please sign in to comment.