Class AsyncInstallTask<T>
Represents an installation task that runs at most once, and yields a single result of type
T
. It can also be passed to other installation tasks as a placeholder
for the final result of T
.
Inherited Members
Namespace: Snowflake.Installation
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public abstract class AsyncInstallTask<T>
Type Parameters
Name | Description |
---|---|
T | The type of the yielded result. |
Constructors
AsyncInstallTask()
Base constructor for AsyncInstallTask<T>.
Declaration
protected AsyncInstallTask()
Properties
TaskName
A string identifier for the task.
Declaration
protected abstract string TaskName { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
CreateFailureDescription(AggregateException)
Creates a description for the task on failure. A description should only depend on the inputs of the class.
Declaration
protected virtual ValueTask<string> CreateFailureDescription(AggregateException e)
Parameters
Type | Name | Description |
---|---|---|
System. |
e |
Returns
Type | Description |
---|---|
System. |
CreateSuccessDescription()
Creates a description for the task on success. A description should only depend on the inputs of the task.
Declaration
protected virtual ValueTask<string> CreateSuccessDescription()
Returns
Type | Description |
---|---|
System. |
ExecuteOnce()
Runs when the AsyncInstallTask<T> is evaluated. This method must only throw within the returned task. This means either it can throw if async, or if this method is synchronous, exceptions are only thrown within the returned task object.
Declaration
protected abstract Task<T> ExecuteOnce()
Returns
Type | Description |
---|---|
System. |
The result of the AsyncInstallTask<T>. |
GetAwaiter()
Gets the awaiter for the AsyncInstallTask<T>. This awaiter is always configured to not continue on captured context. AsyncInstallTask<T> must be context free.
Declaration
public ConfiguredTaskAwaitable<TaskResult<T>>.ConfiguredTaskAwaiter GetAwaiter()
Returns
Type | Description |
---|---|
System. |
The awaiter that results the AsyncInstallTask<T>. |