TaskExt
Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class TaskExt
Methods
AsTaskException(Exception)
View Source
Declaration
public static Task<object> AsTaskException(this Exception ex)
Returns
System.Threading.Tasks.Task<System.Object>
Parameters
Type | Name |
---|---|
System.Exception | ex |
AsTaskException<T>(Exception)
View Source
Declaration
public static Task<T> AsTaskException<T>(this Exception ex)
Returns
System.Threading.Tasks.Task<<T>>
Parameters
Type | Name |
---|---|
System.Exception | ex |
Type Parameters
T
AsTaskResult<T>(T)
View Source
Declaration
public static Task<T> AsTaskResult<T>(this T result)
Returns
System.Threading.Tasks.Task<<T>>
Parameters
Type | Name |
---|---|
<T> | result |
Type Parameters
T
GetResult(Task)
View Source
Declaration
public static object GetResult(this Task task)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Threading.Tasks.Task | task |
GetResult<T>(Task<T>)
View Source
Declaration
public static T GetResult<T>(this Task<T> task)
Returns
<T>
Parameters
Type | Name |
---|---|
System.Threading.Tasks.Task<<T>> | task |
Type Parameters
T
RunSync(Func<Task>)
View Source
Declaration
public static void RunSync(Func<Task> task)
Parameters
Type | Name |
---|---|
System.Func<System.Threading.Tasks.Task> | task |
RunSync<TResult>(Func<Task<TResult>>)
View Source
Declaration
public static TResult RunSync<TResult>(Func<Task<TResult>> task)
Returns
<TResult>
Parameters
Type | Name |
---|---|
System.Func<System.Threading.Tasks.Task<<TResult>>> | task |
Type Parameters
TResult
AsValueTask(Task)
View Source
Declaration
public static ValueTask AsValueTask(this Task task)
Returns
ValueTask
Parameters
Type | Name |
---|---|
System.Threading.Tasks.Task | task |
AsValueTask<T>(Task<T>)
View Source
Declaration
public static ValueTask<T> AsValueTask<T>(this Task<T> task)
Returns
ValueTask<<T>>
Parameters
Type | Name |
---|---|
System.Threading.Tasks.Task<<T>> | task |
Type Parameters
T
AsTask(Task)
View Source
Declaration
public static Task AsTask(this Task task)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Threading.Tasks.Task | task |