-
Notifications
You must be signed in to change notification settings - Fork 0
Command base classes
Jesse R. Jose edited this page Jan 19, 2020
·
1 revision
All base classes implements IDisposable and has a protected property IsDisposing that can be use to not execute the command. Your can optionally override void Dispose(bool isDisposing) to dispose your command.
public class Command<T> : Murk.Command.BaseCommand<T>
{
public override void Execute(T parameter)
{
if (IsDisposing)
returnl;
// do your thing...
}
public override void Dispose(bool isDisposing)
{
IsDisposing = isDisposing;
if (IsDisposing)
{
// do your thing...
}
}
}