// This is a helper, in order to pass the arguments in sequence according to the promises. private static Promise <object> HandleAllPromise(Promise <object> promise, int index, object[] args) { return(promise.Completes(x => { args[index] = x; // return x; })); }