# LibTmux.TmuxHooks.GetAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Hooks/TmuxHooks.cs#L94
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-tmuxhooks-getasync/

```
LibTmux.TmuxHooks.GetAsync(request: HookRequest, cancellationToken: CancellationToken) -> Task<TmuxHook?>
```

Reads one hook.

## Parameters

- `request` (`HookRequest`): Which hook to read.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

The hook, or null when nothing is set for that name.

## Raises

- [`TmuxOptionException`](/en/csharp/latest/reference/libtmux-tmuxoptionexception/): tmux rejected the hook name.
