19 using System.Collections.Generic;
32 #region Public methods 39 IsCancellationRequested =
true;
47 public event EventHandler<ProcessModelEventArgs> Cancelling;
51 #region Abstract methods 60 public abstract bool Execute();
64 #region Protected methods 66 protected virtual void OnCancelling()
68 EventHandler<ProcessModelEventArgs> h = Cancelling;
71 Logger.Info(
"Raising Cancel event; {0} subscriber(s)", h.GetInvocationList().Length);
78 #region Protected properties 87 protected bool IsCancellationRequested {
get;
set; }
93 private static NLog.Logger Logger {
get {
return _logger.Value; } }
95 private static readonly Lazy<
NLog.Logger> _logger =
new Lazy<
NLog.Logger>(() =>
NLog.LogManager.GetCurrentClassLogger());
void Cancel()
Cancels the current process
Abstract base class for models that perform a lengthy process asynchronously.