# 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/2d325b13709752ba6d9a943635c5e2940a2530c0/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.
