Skip to content

Commit 24f8b32

Browse files
committed
Added TaskExtensions
1 parent 16127d0 commit 24f8b32

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace System.Threading.Tasks
6+
{
7+
internal static class TaskExtensions
8+
{
9+
public static bool IsCompletedSuccessfully(this Task task)
10+
{
11+
return task.IsCompleted && !(task.IsFaulted || task.IsCanceled);
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)