# LibTmux.TmuxChaining.ExecuteAsync

- **Module:** LibTmux.TmuxChaining
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Chaining/TmuxChaining.Hooks.cs#L32
- **Page:** https://libtmux.org/reference/dotnet/libtmux-tmuxchaining-executeasync/

```
LibTmux.TmuxChaining.ExecuteAsync(request: SetHookRequest, hooks: TmuxHooks, server: Server, cancellationToken: CancellationToken) -> Task<TmuxCommandResult>
```

Runs a hook request on its own.

## Parameters

- `request` (SetHookRequest) — Which hook to set, and to what.
- `hooks` (TmuxHooks) — The hooks handle whose scope the hook is set in.
- `server` (Server) — The server the hook is set on.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.

## Returns

What tmux printed, which is nothing for an ordinary hook.

## Raises

- `ArgumentNullException` — An argument is null.
- `TmuxCommandException` — tmux reported the command failed.
