Show / Hide Table of Contents

Class TaskType

Provides specialized reflection methods for task types.

Inheritance
Object
TaskType
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: DotNext.Reflection
Assembly: DotNext.dll
Syntax
public static class TaskType

Methods

| Improve this Doc View Source

GetTaskType(Type)

Obtains result type from task type.

Declaration
public static Type GetTaskType(this Type taskType)
Parameters
Type Name Description
Type taskType

A type of Task or Task<TResult>.

Returns
Type Description
Type

Task result type; or null if taskType is not a task type.

| Improve this Doc View Source

MakeTaskType(Type)

Returns task type for the specified result type.

Declaration
public static Type MakeTaskType(this Type taskResult)
Parameters
Type Name Description
Type taskResult

Task result type.

Returns
Type Description
Type

Returns Task if taskResult is Void; or Task<TResult> with actual generic argument equals to taskResult.

See Also
Task
Task<TResult>
| Improve this Doc View Source

MakeTaskType(Type, Boolean)

Returns task type for the specified result type.

Declaration
public static Type MakeTaskType(this Type taskResult, bool valueTask)
Parameters
Type Name Description
Type taskResult

Task result type.

Boolean valueTask

true to make value task type.

Returns
Type Description
Type

Returns Task or ValueTask if taskResult is Void; or Task<TResult> or ValueTask<TResult> with actual generic argument equals to taskResult.

See Also
Task
Task<TResult>
ValueTask
ValueTask<TResult>

See Also

Task
Task<TResult>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX