Skip to content

Commit 1b22f34

Browse files
committedJan 22, 2018
remove Wait()
1 parent e368b9f commit 1b22f34

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed
 

‎WebApiClient/TaskExtend.cs

-17
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,5 @@ public static ITask<TResult> HandleAsDefaultWhenException<TResult>(this ITask<TR
110110
};
111111
return task.Handle().WhenCatch<Exception>(func);
112112
}
113-
114-
115-
/// <summary>
116-
/// 使用工作线程包装请求并同步等待结果
117-
/// </summary>
118-
/// <typeparam name="TResult"></typeparam>
119-
/// <param name="task"></param>
120-
/// <exception cref="ArgumentNullException"></exception>
121-
/// <returns></returns>
122-
public static TResult Wait<TResult>(this ITask<TResult> task)
123-
{
124-
if (task == null)
125-
{
126-
throw new ArgumentNullException(nameof(task));
127-
}
128-
return Task.Run(() => task.InvokeAsync().Result).Result;
129-
}
130113
}
131114
}

0 commit comments

Comments
 (0)