# LibTmux.Workspace.WorkspaceBuilder.ApplyAsync

- **Module:** LibTmux.Workspace
- **Package:** LibTmux.Workspace
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.Workspace/WorkspaceBuilder.Apply.cs#L17
- **Page:** https://libtmux.org/en/csharp/latest/workspace/reference/libtmux-workspace-workspacebuilder-applyasync/

```
LibTmux.Workspace.WorkspaceBuilder.ApplyAsync(plan: WorkspacePlan, cancellationToken: CancellationToken) -> Task<WorkspaceResult>
```

Applies the reviewed actions and records their individual outcomes.

Native defaults and hooks remain runtime dependencies. Input acknowledgement is
not program completion. Cleanup uses only returned native identities; unknown
creations and irreversible shell effects remain visible in the journal.

## Parameters

- `plan` (`WorkspacePlan`): The immutable plan for this builder's resolved endpoint.
- `cancellationToken` (`CancellationToken`): Stops further application and cancels the current operation.

## Returns

The materialized session, created windows and complete action journal.

## Raises

- [`ArgumentException`](https://learn.microsoft.com/dotnet/api/system.argumentexception): The plan selects another endpoint.
- [`WorkspaceOperationCanceledException`](/en/csharp/latest/workspace/reference/libtmux-workspace-workspaceoperationcanceledexception/): The caller canceled application; the exception carries state and action journals.
- [`WorkspaceBuildException`](/en/csharp/latest/workspace/reference/libtmux-workspace-workspacebuildexception/): Preconditions, application or owned cleanup failed.
