public DiFixtureNinject(params INinjectModule[] modules)
 {
     Kernel = new StandardKernel();
     Kernel.Load(modules);
 }
 public DiFixtureNinject(IConfigurationRoot configuration, params INinjectModule[] modules) : base(configuration)
 {
     Kernel = new StandardKernel();
     Kernel.Load(modules);
 }
예제 #3
0
파일: App.xaml.cs 프로젝트: DannyGB/OxTail
        protected override void OnStartup(StartupEventArgs e)
        {
            Kernel = new StandardKernel();

            // Split the kernel loading into seperate modules that contain logically related content
            // There is some overlapping dependencies at the moment that I'd like to refactor.
            // And should you Ninject your Ninject modules?
            Kernel.Load(new INinjectModule[] { new MasterModule(this) });

            MainWindow mainWindow = Kernel.Get<MainWindow>();
            mainWindow.Show();
        }