diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs')
-rw-r--r-- | main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs b/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs index bf08fb5dff..e1887f35b2 100644 --- a/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs +++ b/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs @@ -33,14 +33,15 @@ using MonoDevelop.Ide; using MonoDevelop.Ide.CustomTools; using MonoDevelop.Projects; using MonoDevelop.Projects.Policies; +using System.Threading.Tasks; namespace MonoDevelop.TextTemplating { public class TextTemplatingFilePreprocessor : ISingleFileCustomTool { - public IAsyncOperation Generate (IProgressMonitor monitor, ProjectFile file, SingleFileCustomToolResult result) + public Task Generate (ProgressMonitor monitor, ProjectFile file, SingleFileCustomToolResult result) { - return new ThreadAsyncOperation (delegate { + return Task.Factory.StartNew (delegate { var host = new ProjectFileTemplatingHost (file); var dnp = file.Project as DotNetProject; @@ -74,7 +75,7 @@ namespace MonoDevelop.TextTemplating result.Errors.AddRange (host.Errors); foreach (var err in host.Errors) monitor.Log.WriteLine (err); - }, result); + }); } static bool warningLogged; |