# LibTmux.Internal.MaterializationQuery.FetchOneAsync

- **Module:** LibTmux.Internal.MaterializationQuery
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Materialization/TmuxMaterializationQuery.cs#L65
- **Page:** https://libtmux.org/reference/dotnet/libtmux-internal-materializationquery-fetchoneasync/

```
LibTmux.Internal.MaterializationQuery.FetchOneAsync(listCommand: string, idWireName: string, identifier: string, inSession: TmuxTarget?, cancellationToken: CancellationToken) -> Task<IReadOnlyDictionary<string, string?>?>
```

Fetches the row for exactly one tmux entity.

This costs one command whatever the server holds, where a listing costs
one row per entity on it. Reading the scoped target first keeps a
refreshed handle in the session its predecessor was read in; the bare
identifier still answers when the entity has left that session.

The server's own fields resolve whether or not the target does, so a
stale generation is rejected before absence is reported.

## Parameters

- `listCommand` (string) — The <c>list-*</c> subcommand naming the projection.
- `idWireName` (string) — The format token identifying the entity.
- `identifier` (string) — The entity's tmux identifier.
- `inSession` (TmuxTarget?) — The entity scoped to one session, tried first.
- `cancellationToken` (CancellationToken) — Cancels the tmux commands.

## Returns

The row, or null when tmux no longer has the entity.
