Created
September 18, 2016 21:40
-
-
Save mvacha/bd01982a0d0ccc98557e980aaade58a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = await _connectedTCS.Task.FailOnCancel() | |
.OnSuccess(async () => await _userStatusTCS.Task.FailOnCancel()) | |
.OnSuccess(async () => await _profileTCS.Task.FailOnCancel()); | |
result.OnSuccess(() => | |
{ | |
Log.Info("Connecting to the Gateway successful"); | |
connectedSuccessfully = true; | |
RootNode = _profileTCS.Task.Result.Value; | |
connectedEvent.Set(); | |
}) | |
.OnFailure((res) => | |
{ | |
Log.Error("Error when connecting to the Gateway " + res.Error); | |
connectedEvent.Set(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment