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