Skip to content

Commit

Permalink
async/await...
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed May 19, 2016
1 parent 0e54071 commit 730dbf4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions samples/MetroDemo/MainWindowViewModel.cs
Expand Up @@ -298,9 +298,9 @@ public ICommand ShowInputDialogCommand
return this.showInputDialogCommand ?? (this.showInputDialogCommand = new SimpleCommand
{
CanExecuteDelegate = x => true,
ExecuteDelegate = x =>
ExecuteDelegate = async x =>
{
_dialogCoordinator.ShowInputAsync(this, "From a VM", "This dialog was shown from a VM, without knowledge of Window").ContinueWith(t => Console.WriteLine(t.Result));
await _dialogCoordinator.ShowInputAsync(this, "From a VM", "This dialog was shown from a VM, without knowledge of Window").ContinueWith(t => Console.WriteLine(t.Result));
}
});
}
Expand All @@ -315,9 +315,9 @@ public ICommand ShowLoginDialogCommand
return this.showLoginDialogCommand ?? (this.showLoginDialogCommand = new SimpleCommand
{
CanExecuteDelegate = x => true,
ExecuteDelegate = x =>
ExecuteDelegate = async x =>
{
_dialogCoordinator.ShowLoginAsync(this, "Login from a VM", "This login dialog was shown from a VM, so you can be all MVVM.").ContinueWith(t => Console.WriteLine(t.Result));
await _dialogCoordinator.ShowLoginAsync(this, "Login from a VM", "This login dialog was shown from a VM, so you can be all MVVM.").ContinueWith(t => Console.WriteLine(t.Result));
}
});
}
Expand All @@ -332,9 +332,9 @@ public ICommand ShowMessageDialogCommand
return this.showMessageDialogCommand ?? (this.showMessageDialogCommand = new SimpleCommand
{
CanExecuteDelegate = x => true,
ExecuteDelegate = x =>
ExecuteDelegate = async x =>
{
_dialogCoordinator.ShowMessageAsync(this, "Message from VM", "MVVM based messages!").ContinueWith(t => Console.WriteLine(t.Result));
await _dialogCoordinator.ShowMessageAsync(this, "Message from VM", "MVVM based messages!").ContinueWith(t => Console.WriteLine(t.Result));
}
});
}
Expand Down

0 comments on commit 730dbf4

Please sign in to comment.