# IExecutionConfigurationGatherer Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [IExecutionConfigurationGatherer](/reference/api/csharp/aspire.hosting/iexecutionconfigurationgatherer.md)
- Kind: `Methods`
- Members: `1`

Gathers resource configurations (arguments and environment variables) and optionally applies additional metadata to the resource.

## GatherAsync(IExecutionConfigurationGathererContext, IResource, ILogger, DistributedApplicationExecutionContext, CancellationToken)

- Name: `GatherAsync(IExecutionConfigurationGathererContext, IResource, ILogger, DistributedApplicationExecutionContext, CancellationToken)`
- Modifiers: `abstract`
- Returns: `ValueTask`

Gathers the relevant resource execution configuration (arguments, environment variables, and optionally additional custom data)

```csharp
public interface IExecutionConfigurationGatherer
{
    public abstract ValueTask GatherAsync(
        IExecutionConfigurationGathererContext context,
        IResource resource,
        ILogger resourceLogger,
        DistributedApplicationExecutionContext executionContext,
        CancellationToken cancellationToken = default(CancellationToken))
    {
        // ...
    }
}
```

## Parameters

- `context` ([IExecutionConfigurationGathererContext](/reference/api/csharp/aspire.hosting/iexecutionconfigurationgatherercontext.md))
  The initial resource configuration context.
- `resource` ([IResource](/reference/api/csharp/aspire.hosting/iresource.md))
  The resource for which configuration is being gathered.
- `resourceLogger` (`ILogger`)
  The logger for the resource.
- `executionContext` ([DistributedApplicationExecutionContext](/reference/api/csharp/aspire.hosting/distributedapplicationexecutioncontext.md))
  The execution context in which the resource is being configured.
- `cancellationToken` (`CancellationToken`) `optional`
  A cancellation token.

## Returns

`ValueTask` -- A task representing the asynchronous operation.
