public async Task <bool> UndoLastAsync() { if (!this.IsInProgress) { throw new InvalidOperationException(); } WorkLog currentItem = this._doneWorkLogs.Pop(); ProcessBase process = currentItem.GetProcess(); try { return(await process.CompensateAsync(currentItem, this)); } catch (Exception e) { Console.WriteLine("Exception {0}", e.Message); throw; } }