Class ThreadingTaskImmutable
Wraps a System.Threading.Tasks.Task within an object that gives access to its GetAwaiter method and Status property while ensuring that it cannot be modified in any way.
Inheritance
System.Object
Namespace: Umbraco.Web.Scheduling
Assembly: Umbraco.Web.dll
Syntax
public class ThreadingTaskImmutable
Constructors
View SourceThreadingTaskImmutable(Task)
Initializes a new instance of the ThreadingTaskImmutable class with a Task.
Declaration
public ThreadingTaskImmutable(Task task)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.Tasks.Task | task | The task. |
Properties
View SourceStatus
Gets the TaskStatus of the task.
Declaration
public TaskStatus Status { get; }
Property Value
Type | Description |
---|---|
System.Threading.Tasks.TaskStatus | The current TaskStatus of the task. |
Methods
View SourceGetAwaiter()
Gets an awaiter used to await the task.
Declaration
public TaskAwaiter GetAwaiter()
Returns
Type | Description |
---|---|
System.Runtime.CompilerServices.TaskAwaiter | An awaiter instance. |