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