Class TaskType
- Namespace
- ICSharpCode.Decompiler.TypeSystem
- Assembly
- ICSharpCode.Decompiler.dll
Helper class for dealing with System.Threading.Tasks.Task.
public static class TaskType
- Inheritance
-
TaskType
- Inherited Members
Methods
Create(ICompilation, IType)
Creates a task type.
public static IType Create(ICompilation compilation, IType elementType)
Parameters
compilation
ICompilationelementType
IType
Returns
IsCustomTask(IType, out IType)
Gets whether the specified type is a Task-like type.
public static bool IsCustomTask(IType type, out IType builderType)
Parameters
Returns
IsGenericTaskType(IType, out FullTypeName)
Gets whether the specified type is a generic Task-like type.
public static bool IsGenericTaskType(IType task, out FullTypeName builderTypeName)
Parameters
task
ITypebuilderTypeName
FullTypeNameReturns the full type-name of the builder type, if successful.
Returns
IsNonGenericTaskType(IType, out FullTypeName)
Gets whether the specified type is a non-generic Task-like type.
public static bool IsNonGenericTaskType(IType task, out FullTypeName builderTypeName)
Parameters
task
ITypebuilderTypeName
FullTypeNameReturns the full type-name of the builder type, if successful.
Returns
IsTask(IType)
Gets whether the specified type is Task or Task<T>.
public static bool IsTask(IType type)
Parameters
type
IType
Returns
UnpackTask(ICompilation, IType)
Gets the T in Task<T>. Returns void for non-generic Task. Any other type is returned unmodified.
public static IType UnpackTask(ICompilation compilation, IType type)
Parameters
compilation
ICompilationtype
IType