It does not need the async/await
This commit is contained in:
@@ -27,11 +27,16 @@ namespace WpfViewModelFirst
|
||||
private void Part1Action()
|
||||
{
|
||||
CurrentViewModel = null;
|
||||
Task.Run(async () => await LongDelay()).ContinueWith(c =>
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(c.Result);
|
||||
CurrentViewModel = new Part2ViewModel();
|
||||
Task delay = Task.Run(LongDelay).ContinueWith(c =>
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(c.Result);
|
||||
CurrentViewModel = new Part2ViewModel();
|
||||
}, TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
//Task.Run(async () => await LongDelay()).ContinueWith(c =>
|
||||
// {
|
||||
// System.Diagnostics.Debug.WriteLine(c.Result);
|
||||
//CurrentViewModel = new Part2ViewModel();
|
||||
//}, TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
}
|
||||
|
||||
private async Task<string> LongDelay()
|
||||
|
||||
Reference in New Issue
Block a user