# LibTmux.Server.Chain

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Server.Chaining.cs#L17
- **Page:** https://libtmux.org/en/csharp/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`](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception): The handle has no connection.
