using System; namespace Implab { public class ActionTask : ActionTaskBase, IResolvable { readonly Action m_task; public ActionTask(Action task, Action error, Action cancel, bool autoCancellable) : base(error,cancel, autoCancellable) { m_task = task; } public void Resolve() { if (m_task != null && LockCancelation()) { try { m_task(); SetResult(); } catch(Exception err) { SetErrorInternal(err); } } } } }