/// <summary> /// This overload of the method Load provides binding for the project exports. /// </summary> public override void Load() { var window = new BalloonsView(); var controller = new MainWindowController(window, new Resources()); this.AppKernel.Unbind<IEventBasedUserInterface>(); this.AppKernel.Unbind<IPrinter>(); this.AppKernel.Bind<IEventBasedUserInterface>().ToMethod(ctx => controller); this.AppKernel.Bind<IPrinter>().ToMethod(ctx => controller); }
public EventEngineTests() { this.kernel = new StandardKernel(); this.kernel.Bind<ILogger>().ToMethod(x => LogHelper.GetLogger()); DependancyBinder.Instance .RegisterModules( new ModelsModule(this.kernel), new LogicModule(this.kernel), new ValidationModule(this.kernel), new WpfCommandModule(this.kernel), new HighscoreModule(this.kernel), new SaverModule(this.kernel), new WpfModule(this.kernel), new SoundsModule(this.kernel)) .LoadAll(); this.bundle = new WpfBundle(this.kernel); this.ctx = new Context(this.kernel); this.engine = new EventEngine(this.ctx, this.bundle); this.view = new BalloonsView(); this.resources = new Resources(); this.controller = new MainWindowController(this.view, this.resources); }
public void TestInit() { this.view = new BalloonsView(); this.resourceProvider = new Resources(); this.controller = new MainWindowController(this.view, this.resourceProvider); }