# LibTmux.Server.Chain

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Server.Chaining.cs#L17
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-server-chain/

```
LibTmux.Server.Chain() -> TmuxChain
```

Begins a chain that runs its commands in one tmux invocation.

This is the batched counterpart to the one-shot methods. Which one is
in use is visible where the call starts rather than in an option, and
nothing runs until the chain is executed.

## Returns

An empty chain bound to this server.

## Raises

- `InvalidOperationException`: The handle has no connection.
