# LibTmux.TmuxOptions.GetAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Options/TmuxOptions.cs#L77
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-tmuxoptions-getasync/

```
LibTmux.TmuxOptions.GetAsync(request: GetOptionRequest, cancellationToken: CancellationToken) -> Task<IReadOnlyList<TmuxOption>>

LibTmux.TmuxOptions.GetAsync(key: TmuxOptionKey<T>, cancellationToken: CancellationToken) -> Task<T>
```

Reads one option.

Unescaping a doubled dollar sign needs the connected tmux's version, so
a table reached from a handle that has not found a live server yet
discovers one first.

## Parameters

- `request` (`GetOptionRequest`): Which option to read, and how. (for `GetAsync(request, cancellationToken)`)
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.
- `key` (`TmuxOptionKey<T>`): The option and how to read it. (for `GetAsync(key, cancellationToken)`)

## Returns

Every entry tmux reported for the name: one for an ordinary option, and
one per set index for an array. (for `GetAsync(request, cancellationToken)`)

The value tmux applies here, set in this scope or inherited from a parent. (for `GetAsync(key, cancellationToken)`)

## Raises

- [`TmuxOptionException`](/en/csharp/latest/reference/libtmux-tmuxoptionexception/): tmux rejected the option name. (for `GetAsync(request, cancellationToken)`)
- [`TmuxOptionException`](/en/csharp/latest/reference/libtmux-tmuxoptionexception/): tmux rejected the name, reported no value, or reported one the key cannot read. (for `GetAsync(key, cancellationToken)`)
