Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@xamarin.com>2015-02-12 19:34:37 +0300
committerLluis Sanchez Gual <lluis@xamarin.com>2015-02-12 19:34:37 +0300
commitbd38a89777089705a52eddb3e5e12e2d5e9160eb (patch)
tree5ca57dddbf5c3bd0048692e6ceb779aeed496d9a /main/src/addins/MonoDevelop.Autotools
parent52c2f7e0baebb0f1d75d0fa7cf8c078782722713 (diff)
Add async support for console tools
mdtool now sets up a main loop, so console tools can use the same threading model as the IDE
Diffstat (limited to 'main/src/addins/MonoDevelop.Autotools')
-rw-r--r--main/src/addins/MonoDevelop.Autotools/MakefileGeneratorTool.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.Autotools/MakefileGeneratorTool.cs b/main/src/addins/MonoDevelop.Autotools/MakefileGeneratorTool.cs
index 76af27790c..efa1f2e142 100644
--- a/main/src/addins/MonoDevelop.Autotools/MakefileGeneratorTool.cs
+++ b/main/src/addins/MonoDevelop.Autotools/MakefileGeneratorTool.cs
@@ -4,6 +4,7 @@ using MonoDevelop.Core.ProgressMonitoring;
using MonoDevelop.Core;
using MonoDevelop.Deployment;
using MonoDevelop.Projects;
+using System.Threading.Tasks;
namespace MonoDevelop.Autotools
{
@@ -13,7 +14,7 @@ namespace MonoDevelop.Autotools
string defaultConfig = null;
string filename = null;
- public int Run (string [] arguments)
+ public async Task<int> Run (string [] arguments)
{
Console.WriteLine ("MonoDevelop Makefile generator");
if (arguments.Length == 0) {
@@ -50,7 +51,7 @@ namespace MonoDevelop.Autotools
Console.WriteLine (GettextCatalog.GetString ("Loading solution file {0}", filename));
ConsoleProgressMonitor monitor = new ConsoleProgressMonitor ();
- Solution solution = Services.ProjectService.ReadWorkspaceItem (monitor, filename).Result as Solution;
+ Solution solution = await Services.ProjectService.ReadWorkspaceItem (monitor, filename) as Solution;
if (solution == null) {
Console.WriteLine (GettextCatalog.GetString ("Error: Makefile generation supported only for solutions.\n"));
return 1;