ResourceExtensions.ProcessArgumentValuesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.