# CommandLineArgsCallbackContext

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/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.
