# TerminalContext

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `17.0.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting/IInteractionService.cs)

Provides cancellation to the work callback of a terminal interaction.

## Definition

```csharp
namespace Aspire.Hosting;

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

## Constructors

- [TerminalContext](/reference/api/csharp/aspire.hosting/terminalcontext/constructors.md#constructor)

## Properties

- [CancellationToken](/reference/api/csharp/aspire.hosting/terminalcontext/properties.md#cancellationtoken) : `CancellationToken` `get; init` -- Gets the token signaled when the user requests cancellation or the interaction is externally canceled.
