Created
May 6, 2020 08:02
-
-
Save marek-safar/a59a5c58e459e717e6e4612bed23e8ae to your computer and use it in GitHub Desktop.
This file contains 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
if (task.Exception == null) | |
{ | |
object result; | |
Type task_type = task.GetType(); | |
if (task_type == typeof(Task)) | |
{ | |
result = Array.Empty<object>(); | |
} | |
else | |
{ | |
if (s_taskResult == null) { | |
s_taskResult = task_type.GetMethod("get_Result"); | |
result = s_taskResult.Invoke(task) ?? Array.Empty<object>()); | |
} | |
continuationObj.Invoke("resolve", result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment