Class AsyncInstallTaskEnumerable<T>
Represents an installation task that runs at most once, and yields multiple results 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 AsyncInstallTaskEnumerable<T>
Type Parameters
Name | Description |
---|---|
T | The type of the yielded results. |
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 exception)
Parameters
Type | Name | Description |
---|---|---|
System. |
exception | The exception thrown by the task on failure. |
Returns
Type | Description |
---|---|
System. |
CreateSuccessDescription(T)
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(T current)
Parameters
Type | Name | Description |
---|---|---|
T | current | The element currently being processed by the task. |
Returns
Type | Description |
---|---|
System. |
ExecuteOnce()
Runs when the AsyncInstallTaskEnumerable<T> is evaluated.
Declaration
protected abstract IAsyncEnumerable<T> ExecuteOnce()
Returns
Type | Description |
---|---|
System. |
The result of the AsyncInstallTaskEnumerable<T>. |
GetAsyncEnumerator(CancellationToken)
Gets the System.Collections.Generic.IAsyncEnumerator<T> for the AsyncInstallTaskEnumerable<T>.
Declaration
public IAsyncEnumerator<TaskResult<T>> GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken |
Returns
Type | Description |
---|---|
System. |
The System.Collections.Generic.IAsyncEnumerator<T> that results the AsyncInstallTaskEnumerable<T>. |