# LibTmux.ControlModeSubscriptions.SubscribeSessionAsync

- **Module:** LibTmux.ControlModeSubscriptions
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/ControlMode/ControlModeSubscriptions.cs#L28
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-controlmodesubscriptions-subscribesessionasync/

```
LibTmux.ControlModeSubscriptions.SubscribeSessionAsync(session: IControlModeSession, name: string, format: string, cancellationToken: CancellationToken) -> Task<IReadOnlyList<string>>
```

Subscribes to a session-scoped format changing.

## Parameters

- `session` (IControlModeSession): The control client to subscribe on.
- `name` (string): The subscription's name, echoed back as the first word of a
<c>%subscription-changed</c> notification for it.
- `format` (string): The tmux format to watch, without <c>#{}</c>.
- `cancellationToken` (CancellationToken): Cancels the tmux command.

## Returns

The lines tmux printed answering the subscribe command.
