/// <summary>Raises the <see cref="E:System.Windows.Application.Startup" /> event.</summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { Container container = new Container(x => x.AddRegistry <AppRegistry>()); WindowFactory factory = container.GetInstance <WindowFactory>(); MainWindow window = factory.Create(true); container.Configure(x => x.For <Dispatcher>().Add(window.Dispatcher)); IConfigurationRoot configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .Build(); container.Configure(x => x.For <IConfigurationRoot>().Add(configuration)); //configure dependency resolver for RxUI / Splat ReactiveUIDependencyResolver resolver = new ReactiveUIDependencyResolver(container); resolver.Register(() => new LogEntryView(), typeof(IViewFor <LogEntryViewer>)); //Locator.Current = resolver; //RxApp.SupportsRangeNotifications = false; //run start up jobs container.GetInstance <TradePriceUpdateJob>(); container.GetInstance <ILogEntryService>(); TaskAwaiter <Bootstrap> w = ClientBootstrap.Client.InitBootstrapAsync().GetAwaiter(); window.Show(); base.OnStartup(e); }
/// <summary>Raises the <see cref="E:System.Windows.Application.Startup" /> event.</summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { var container = new Container(x => x.AddRegistry <AppRegistry>()); var factory = container.GetInstance <WindowFactory>(); var window = factory.Create(true); container.Configure(x => x.For <Dispatcher>().Add(window.Dispatcher)); //configure dependency resolver for RxUI / Splat var resolver = new ReactiveUIDependencyResolver(container); resolver.Register(() => new LogEntryView(), typeof(IViewFor <LogEntryViewer>)); Locator.Current = resolver; RxApp.SupportsRangeNotifications = false; //run start up jobs container.GetInstance <TradePriceUpdateJob>(); container.GetInstance <ILogEntryService>(); window.Show(); base.OnStartup(e); }