diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-06-30 20:38:26 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2019-07-06 22:17:15 +0300 |
commit | 23d031032df6cee1c56f2de7ec6432a9501b716e (patch) | |
tree | e8177239f798a91506baf7808fdc7a0eb119460d /main/src/core/MonoDevelop.Core | |
parent | c813214e48185e502028839c879b580ff35b98e7 (diff) |
Fix some wrongly used usings when await is needed for them to actually run when they should
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs | 8 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs index 8cb1a4a768..f024f42aed 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs @@ -913,16 +913,14 @@ namespace MonoDevelop.Projects public Task<List<AssemblyReference>> GetReferences (ConfigurationSelector configuration) { - return BindTask (async ct => { - return await ProjectExtension.OnGetReferences (configuration, ct); - }); + return BindTask (ct => ProjectExtension.OnGetReferences (configuration, ct)); } public Task<List<AssemblyReference>> GetReferences (ConfigurationSelector configuration, CancellationToken token) { - return BindTask (ct => { + return BindTask (async ct => { using (var tokenSource = CancellationTokenSource.CreateLinkedTokenSource (ct, token)) { - return ProjectExtension.OnGetReferences (configuration, tokenSource.Token); + return await ProjectExtension.OnGetReferences (configuration, tokenSource.Token).ConfigureAwait (false); } }); } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs index 944478bf6e..43468d7148 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs @@ -472,10 +472,10 @@ namespace MonoDevelop.Projects if (sourceProject == null) return Task.FromResult (ImmutableArray<FilePath>.Empty); - return BindTask<ImmutableArray<FilePath>> (cancelToken => { + return BindTask<ImmutableArray<FilePath>> (async cancelToken => { using (var cancelSource = CancellationTokenSource.CreateLinkedTokenSource (cancelToken)) using (var monitor = new ProgressMonitor (cancelSource)) { - return GetAnalyzerFilesAsync (monitor, configuration); + return await GetAnalyzerFilesAsync (monitor, configuration); } }); } @@ -496,10 +496,10 @@ namespace MonoDevelop.Projects if (sourceProject == null) return Task.FromResult (ImmutableArray<ProjectFile>.Empty); - return BindTask<ImmutableArray<ProjectFile>> (cancelToken => { + return BindTask<ImmutableArray<ProjectFile>> (async cancelToken => { using (var cancelSource = CancellationTokenSource.CreateLinkedTokenSource (cancelToken)) using (var monitor = new ProgressMonitor (cancelSource)) { - return GetSourceFilesAsync (monitor, configuration); + return await GetSourceFilesAsync (monitor, configuration); } }); } |