Class AsyncHelper
- Namespace
- JJMasterData.Core.Tasks
- Assembly
- JJMasterData.Core.dll
Class to safely run async methods on sync environments like ASP.NET without deadlocks.
public static class AsyncHelper
- Inheritance
-
AsyncHelper
- Inherited Members
Methods
RunSync(Func<Task>)
Execute is an async Task method which has a void return value synchronously
public static void RunSync(Func<Task> task)
Parameters
RunSync<T>(Func<Task<T>>)
Execute is an async Task method which has a T return type synchronously
public static T RunSync<T>(Func<Task<T>> task)
Parameters
Returns
- T
Type Parameters
T
Return Type
RunSync<T>(Func<ValueTask<T>>)
public static T RunSync<T>(Func<ValueTask<T>> task)
Parameters
Returns
- T
Type Parameters
T
RunSync<T>(Func<ValueTask>)
public static void RunSync<T>(Func<ValueTask> task)
Parameters
Type Parameters
T