diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-12-21 00:28:11 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2019-12-23 16:26:05 +0300 |
commit | 51d26083010e9b8d7005834a46748cc932cd69ca (patch) | |
tree | 3a7536e714d58a4996438bddaff5366ab07c739a /main/src/addins/MonoDevelop.PackageManagement | |
parent | d04130684ea68f6ef7686ab107f7eefecc6d9d17 (diff) |
Switch to Task.CompletedTask where applicable
Diffstat (limited to 'main/src/addins/MonoDevelop.PackageManagement')
5 files changed, 9 insertions, 9 deletions
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopCommonOperations.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopCommonOperations.cs index 995fc8ac3c..f5b704b1e0 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopCommonOperations.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopCommonOperations.cs @@ -36,7 +36,7 @@ namespace MonoDevelop.PackageManagement {
public Task CollapseAllNodes (ISolutionManager solutionManager)
{
- return Task.FromResult (0);
+ return Task.CompletedTask;
}
public Task OpenFile (string fullPath)
@@ -48,7 +48,7 @@ namespace MonoDevelop.PackageManagement public Task SaveSolutionExplorerNodeStates (ISolutionManager solutionManager)
{
- return Task.FromResult (0);
+ return Task.CompletedTask;
}
}
}
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopMSBuildNuGetProjectSystem.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopMSBuildNuGetProjectSystem.cs index 9d5dcee75a..3261ea8631 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopMSBuildNuGetProjectSystem.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopMSBuildNuGetProjectSystem.cs @@ -283,7 +283,7 @@ namespace MonoDevelop.PackageManagement public Task BeginProcessingAsync ()
{
- return Task.FromResult (true);
+ return Task.CompletedTask;
}
// TODO: Support recursive.
@@ -304,7 +304,7 @@ namespace MonoDevelop.PackageManagement public Task EndProcessingAsync ()
{
- return Task.FromResult (true);
+ return Task.CompletedTask;
}
public bool FileExistsInProject (string path)
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectExtensions.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectExtensions.cs index 9e405faacf..45bbbc864c 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectExtensions.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectExtensions.cs @@ -60,7 +60,7 @@ namespace MonoDevelop.PackageManagement return buildIntegratedProject.PostProcessAsync (context, token);
}
- return Task.FromResult (0);
+ return Task.CompletedTask;
}
public static void OnAfterExecuteActions (this NuGetProject project, IEnumerable<NuGetProjectAction> actions)
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectServices.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectServices.cs index 2f8a148ec3..d28b5fd3a3 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectServices.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/NuGetProjectServices.cs @@ -67,7 +67,7 @@ namespace MonoDevelop.PackageManagement public Task SaveProjectAsync (CancellationToken token) { - return Task.FromResult (0); + return Task.CompletedTask; } public Task<bool> ExecutePackageInitScriptAsync ( @@ -88,7 +88,7 @@ namespace MonoDevelop.PackageManagement bool throwOnFailure, CancellationToken token) { - return Task.FromResult (0); + return Task.CompletedTask; } } } diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageManagementLogger.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageManagementLogger.cs index e050f320aa..8b0e887581 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageManagementLogger.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageManagementLogger.cs @@ -98,13 +98,13 @@ namespace MonoDevelop.PackageManagement public Task LogAsync (LogLevel level, string data)
{
Log (level, data);
- return Task.FromResult (true);
+ return Task.CompletedTask;
}
public Task LogAsync (ILogMessage message)
{
Log (message);
- return Task.FromResult (true);
+ return Task.CompletedTask;
}
public void Log (LogLevel level, string data)
|