From fbf8cc833c441de8890998600be044296acfc783 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Tue, 21 Aug 2012 22:50:59 -0400 Subject: a few more async optimizations --- MediaBrowser.Common/UI/BaseApplication.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Common/UI/BaseApplication.cs') diff --git a/MediaBrowser.Common/UI/BaseApplication.cs b/MediaBrowser.Common/UI/BaseApplication.cs index 9ad2a749b..27c64f451 100644 --- a/MediaBrowser.Common/UI/BaseApplication.cs +++ b/MediaBrowser.Common/UI/BaseApplication.cs @@ -17,15 +17,15 @@ namespace MediaBrowser.Common.UI protected abstract IKernel InstantiateKernel(); protected abstract Window InstantiateMainWindow(); - protected async override void OnStartup(StartupEventArgs e) + protected override void OnStartup(StartupEventArgs e) { // Without this the app will shutdown after the splash screen closes this.ShutdownMode = ShutdownMode.OnExplicitShutdown; - await LoadKernel().ConfigureAwait(false); + LoadKernel(); } - private async Task LoadKernel() + private async void LoadKernel() { Kernel = InstantiateKernel(); @@ -40,9 +40,7 @@ namespace MediaBrowser.Common.UI await Kernel.Init(progress); - double seconds = (DateTime.Now - now).TotalSeconds; - - Logger.LogInfo("Kernel.Init completed in {0} seconds.", seconds); + Logger.LogInfo("Kernel.Init completed in {0} seconds.", (DateTime.Now - now).TotalSeconds); splash.Close(); this.ShutdownMode = System.Windows.ShutdownMode.OnLastWindowClose; -- cgit v1.2.3