# TerminalContext Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [TerminalContext](/reference/api/csharp/aspire.hosting/terminalcontext.md)
- Kind: `Properties`
- Members: `1`

Provides cancellation to the work callback of a terminal interaction.

<a id="cancellationtoken"></a>

## CancellationToken

- Name: `CancellationToken`
- Modifiers: `get; init`
- Returns: `CancellationToken`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting/IInteractionService.cs)

Gets the token signaled when the user requests cancellation or the interaction is externally canceled.

```csharp
public CancellationToken CancellationToken { get; init; }
```

## Remarks

Observe this token in automation calls and other asynchronous work. Cancellation does not stop the terminal; its caller remains responsible for disposing it when no longer needed.
