diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-21 22:50:59 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-21 22:50:59 -0400 |
| commit | fbf8cc833c441de8890998600be044296acfc783 (patch) | |
| tree | d2980ddcbf5987f805916842f975795d9cabce83 /MediaBrowser.Common/UI/BaseApplication.cs | |
| parent | 1c5f728ec252f7a146b7e6fa1b409e2ca3f8d920 (diff) | |
a few more async optimizations
Diffstat (limited to 'MediaBrowser.Common/UI/BaseApplication.cs')
| -rw-r--r-- | MediaBrowser.Common/UI/BaseApplication.cs | 10 |
1 files changed, 4 insertions, 6 deletions
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;
|
