private async Task WaitForEnqueueAsync(ProjectConfigurationStateSynchronizer synchronizer, bool hasTask = true)
 {
     if (hasTask)
     {
         var kvp = Assert.Single(synchronizer.ProjectInfoMap);
         await LegacyDispatcher.RunOnDispatcherThreadAsync(
             () => kvp.Value.ProjectUpdateTask.Wait(), CancellationToken.None).ConfigureAwait(false);
     }
     else
     {
         Assert.Empty(synchronizer.ProjectInfoMap);
     }
 }
コード例 #2
0
 protected Task RunOnDispatcherThreadAsync(Func <Task> action)
 {
     return(LegacyDispatcher.RunOnDispatcherThreadAsync(
                async() => await action().ConfigureAwait(true),
                CancellationToken.None));
 }
コード例 #3
0
 protected Task <TReturn> RunOnDispatcherThreadAsync <TReturn>(Func <TReturn> action)
 {
     return(LegacyDispatcher.RunOnDispatcherThreadAsync(
                () => action(),
                CancellationToken.None));
 }