# LibTmux.TmuxChaining.ExecuteAsync

- **Module:** LibTmux.TmuxChaining
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Chaining/TmuxChaining.Hooks.cs#L55
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-tmuxchaining-executeasync/

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

Runs a hook on its own.

## Parameters

- `request` (HookRequest): Which hook to run.
- `hooks` (TmuxHooks): The hooks handle whose scope holds it.
- `server` (Server): The server the hook runs on.
- `cancellationToken` (CancellationToken): Cancels the tmux command.

## Returns

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

## Raises

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