Share via


ResourceExtensions.ProcessArgumentValuesAsync Method

Definition

Processes argument values for the specified resource in the given execution context.

public static System.Threading.Tasks.ValueTask ProcessArgumentValuesAsync(this Aspire.Hosting.ApplicationModel.IResource resource, Aspire.Hosting.DistributedApplicationExecutionContext executionContext, Action<object?,string?,Exception?,bool> processValue, Microsoft.Extensions.Logging.ILogger logger, string? containerHostName = default, System.Threading.CancellationToken cancellationToken = default);
static member ProcessArgumentValuesAsync : Aspire.Hosting.ApplicationModel.IResource * Aspire.Hosting.DistributedApplicationExecutionContext * Action<obj, string, Exception, bool> * Microsoft.Extensions.Logging.ILogger * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function ProcessArgumentValuesAsync (resource As IResource, executionContext As DistributedApplicationExecutionContext, processValue As Action(Of Object, String, Exception, Boolean), logger As ILogger, Optional containerHostName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask

Parameters

resource
IResource

The resource containing the argument values to process.

executionContext
DistributedApplicationExecutionContext

The execution context used during the processing of argument values.

processValue
Action<Object,String,Exception,Boolean>

A callback invoked for each argument value. This action provides the unprocessed value, processed string representation, an exception if one occurs, and a boolean indicating the success of processing.

logger
ILogger

The logger used for logging information or errors during the argument processing.

containerHostName
String

An optional container host name to consider during processing, if applicable.

cancellationToken
CancellationToken

A token for cancelling the operation, if needed.

Returns

A task representing the asynchronous operation.

Applies to