public void CanChainTasksWithoutEndWithAndThrowException() { using (var c = new ChainedOperation()) { c.BeginWith(First) // first action .Then(Second) // second action .Then(Third) // third action .Then(Fourth); // fourth action } }
public void CanChainTasks() { using (var c = new ChainedOperation()) { c.BeginWith(First) // first action .Then(Second) // second action .Then(Third) // third action .Then(Fourth) // fourth action .EndWith(e => { if (e != null) { Trace.TraceError("An exception ocurred!"); } }); } }