public Promise Then(Action action) { onResolve.AddListenerOneShot(action); if (isResolved) { onResolve.Invoke(); } return(this); }
public Promise Catch(Action <Exception> action) { onReject.AddListenerOneShot(action); if (isRejected) { onReject.Invoke(cachedException); } return(this); }
public Promise <T> Then(Action <T> action) { onResolve.AddListenerOneShot(action); if (isResolved) { onResolve.Invoke(cache); } return(this); }