# Examples

Source: https://libtmux.org/en/csharp/latest/examples/

> Programs for sending input, capturing output, and building workspaces.

Use these programs to send input, capture output, and build a workspace.
Each example page includes its source and test coverage. Check those details
before adapting an excerpt into a standalone program.

<a id="what-verified-means-per-port"></a>

## Source and verification

Port repositories use the following checks for their source examples. This site
reads or copies those examples; a successful site build alone does not execute
them:

`sync_snippets.py --check` checks excerpts from tested `[Example]`
methods. `ReadmeExampleTests` also compiles and executes blocks marked
`csharp run`.

See [Testing with libtmux](https://libtmux.org/en/csharp/latest/guides/testing-with-libtmux/) for the fixture
each of those test suites runs against, and each example page for the
exact file a given snippet was quoted from.

- [Attach and send keys](https://libtmux.org/en/csharp/latest/examples/attach-and-send-keys/): Find a session, send a command, and read its output.
- [Capture pane output](https://libtmux.org/en/csharp/latest/examples/capture-pane-output/): Read a pane's screen and wait for output to appear.
- [Build a workspace from a file](https://libtmux.org/en/csharp/latest/examples/workspace-from-file/): Create a session, windows, and panes from configuration.
