# CommandLineArgsCallbackContext

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/CommandLineArgsCallbackAnnotation.cs)

Represents a callback context for the list of command-line arguments associated with an executable resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class CommandLineArgsCallbackContext
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting/CommandLineArgsCallbackContext`

## Constructors

- [CommandLineArgsCallbackContext(IList<object>, CancellationToken)](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/constructors.md#constructor-ilist-object-cancellationtoken) -- Represents a callback context for the list of command-line arguments associated with an executable resource.
- [CommandLineArgsCallbackContext(IList<object>, IResource, CancellationToken)](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/constructors.md#constructor-ilist-object-iresource-cancellationtoken) -- Represents a callback context for the list of command-line arguments associated with an executable resource.

## Properties

- [Args](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/properties.md#args) : `IList<object>` `get` -- Gets the list of command-line arguments.
- [CancellationToken](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/properties.md#cancellationtoken) : `CancellationToken` `get` -- Gets the cancellation token associated with the callback context.
- [ExecutionContext](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/properties.md#executioncontext) : [DistributedApplicationExecutionContext](/reference/api/csharp/aspire.hosting/distributedapplicationexecutioncontext.md) `get; init` -- Gets or sets the execution context for the distributed application.
- [Logger](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/properties.md#logger) : `ILogger` `get; init` -- Gets or sets the logger for the distributed application.
- [Resource](/reference/api/csharp/aspire.hosting/commandlineargscallbackcontext/properties.md#resource) : [IResource](/reference/api/csharp/aspire.hosting/iresource.md) `get` `ats export` -- The resource associated with this callback context.
