Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellabyte/1524426 to your computer and use it in GitHub Desktop.
Save kellabyte/1524426 to your computer and use it in GitHub Desktop.
public class Bootstrapper
{
private Container container = null;
public Bootstrapper()
{
Initialize();
}
private void Initialize()
{
container = new Container();
container.Register<IEventAggregator>(new EventAggregator());
container.Register<IDatabase>(new Database());
container.Register<MainViewModel>(c => new MainViewModel(
c.Resolve<IEventAggregator>(),
c.Resolve<IDatabase>()));
container.Register<BrowserViewModel>(c => new BrowserViewModel());
container.Register<SettingsViewModel>(c => new SettingsViewModel(
c.Resolve<IDatabase>()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment