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.Core.ProgressMonitoring/ProgressStatusMonitor.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ProgressStatusMonitor.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ProgressStatusMonitor.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ProgressStatusMonitor.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ProgressStatusMonitor.cs index b35e4043de..6f3c772b21 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ProgressStatusMonitor.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ProgressStatusMonitor.cs @@ -33,15 +33,16 @@ namespace MonoDevelop.Core.ProgressMonitoring { public class ProgressStatusMonitor: MarshalByRefObject, IProgressStatus, IDisposable { - IProgressMonitor monitor; + ProgressMonitor monitor; int step; int logLevel; + bool canceled; - public ProgressStatusMonitor (IProgressMonitor monitor): this (monitor, 1) + public ProgressStatusMonitor (ProgressMonitor monitor): this (monitor, 1) { } - public ProgressStatusMonitor (IProgressMonitor monitor, int logLevel) + public ProgressStatusMonitor (ProgressMonitor monitor, int logLevel) { this.logLevel = logLevel; this.monitor = monitor; @@ -77,7 +78,7 @@ namespace MonoDevelop.Core.ProgressMonitoring } public bool IsCanceled { - get { return monitor.IsCancelRequested; } + get { return monitor.CancellationToken.IsCancellationRequested || canceled; } } public int LogLevel { @@ -87,7 +88,7 @@ namespace MonoDevelop.Core.ProgressMonitoring public void Cancel () { - monitor.AsyncOperation.Cancel (); + canceled = true; } public void Dispose () |