private void TestConnectionAsync(bool notify) { var taskBuilder = new TaskBuilder() .OnCurrentThread() .DoWork(TestConnection) .Fail(Fail) .Succeed(Succeed); if (notify) { taskBuilder.Finally(NotifyObservers); } taskBuilder.Build().Start(); }