Abstract base class for models that perform a lengthy process asynchronously. More...
Public Member Functions | |
| void | Cancel () |
| Cancels the current process More... | |
| abstract bool | Execute () |
| This method may be called by a ProcessViewModelBase-derived class in a worker task that wraps this method in a try...catch structure. More... | |
Protected Member Functions | |
| virtual void | OnCancelling () |
Properties | |
| ProcessModel | Dependent [get, set] |
| bool | IsCancellationRequested [get, set] |
| This property is set to true by the Cancel() method. More... | |
Events | |
| EventHandler< ProcessModelEventArgs > | Cancelling |
Abstract base class for models that perform a lengthy process asynchronously.
This class is indended to be used with Bovender.Mvvm.ViewModels.ProcessViewModelBase.
Definition at line 30 of file ProcessModel.cs.
|
inline |
Cancels the current process
Implements Bovender.Mvvm.Models.IProcessModel.
Definition at line 37 of file ProcessModel.cs.
|
pure virtual |
This method may be called by a ProcessViewModelBase-derived class in a worker task that wraps this method in a try...catch structure.
The implementation does not need to and should not handle tasks or threads itself.
Implements Bovender.Mvvm.Models.IProcessModel.
Implemented in Bovender.Versioning.Updater, Bovender.Versioning.ReleaseInfo, Bovender.UnitTests.Mvvm.ProcessModelForTesting, and Bovender.UnitTests.Mvvm.ExceptionProcessModelForTesting.
|
getsetprotected |
This property is set to true by the Cancel() method.
The implementation of the Execute method should query this property during the process.
Definition at line 87 of file ProcessModel.cs.