using System; namespace Implab { public class ActionChainTask : ActionChainTaskBase, IDeferred { readonly Func m_task; public ActionChainTask(Func task, Func error, Func cancel) : base(error,cancel) { m_task = task; } public void Resolve() { if (m_task != null && LockCancelation()) { try { Observe(m_task()); } catch(Exception err) { HandleErrorInternal(err); } } } } }