Created
December 27, 2011 17:17
-
-
Save kellabyte/1524426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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