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/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs index 835a0c2d92..887af95949 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs @@ -29,14 +29,15 @@ using System; using System.CodeDom.Compiler; using MonoDevelop.Core; using MonoDevelop.Projects.Extensions; +using System.Threading.Tasks; namespace MonoDevelop.Projects.Extensions { public abstract class SolutionItemHandler: ISolutionItemHandler { - SolutionItem item; + SolutionFolderItem item; - public SolutionItemHandler (SolutionItem item) + public SolutionItemHandler (SolutionFolderItem item) { this.item = item; } @@ -45,30 +46,30 @@ namespace MonoDevelop.Projects.Extensions get { return true; } } - public SolutionItem Item { + public SolutionFolderItem Item { get { return item; } } - public virtual BuildResult RunTarget (IProgressMonitor monitor, string target, ConfigurationSelector configuration) + public async virtual Task<BuildResult> RunTarget (ProgressMonitor monitor, string target, ConfigurationSelector configuration) { switch (target) { case "Build": - return OnBuild (monitor, configuration); + return await OnBuild (monitor, configuration); case "Clean": - return OnClean (monitor, configuration); + return await OnClean (monitor, configuration); } return new BuildResult (new CompilerResults (null), ""); } - protected virtual BuildResult OnBuild (IProgressMonitor monitor, ConfigurationSelector configuration) + protected virtual Task<BuildResult> OnBuild (ProgressMonitor monitor, ConfigurationSelector configuration) { - return null; + return Task.FromResult (BuildResult.Success); } - protected virtual BuildResult OnClean (IProgressMonitor monitor, ConfigurationSelector configuration) + protected virtual Task<BuildResult> OnClean (ProgressMonitor monitor, ConfigurationSelector configuration) { - return null; + return Task.FromResult (BuildResult.Success); } public virtual void Dispose () @@ -77,7 +78,7 @@ namespace MonoDevelop.Projects.Extensions public abstract string ItemId { get; } - public abstract void Save (IProgressMonitor monitor); + public abstract Task Save (ProgressMonitor monitor); public virtual void OnModified (string hint) { |