TapePlayer
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
Prepares and plays Tape documents against borrowed or player-owned terminals.
public sealed class TapePlayerInheritance
Object → TapePlayer
Methods
PlayAsync(TapeDocument, Hex1bTerminal, TapePlaybackOptions?, CancellationToken)
Validates, executes, and captures a tape without taking ownership of its terminal.
Parameters:
tape(TapeDocument): The parsed document to execute.terminal(Hex1bTerminal): The caller-owned target terminal.options(TapePlaybackOptions): Playback and capture configuration.cancellationToken(CancellationToken): Cancellation for preparation and execution.
Returns: Task<TapeExecutionResult>
The owned final snapshot and finalized artifact information.
public Task<TapeExecutionResult> PlayAsync(TapeDocument tape, Hex1bTerminal terminal, TapePlaybackOptions? options = null, CancellationToken cancellationToken = default)PlayAsync(TapeDocument, TapePlaybackOptions?, CancellationToken)
Builds an owned terminal, plays a tape, captures the final state, and cleans up the workload and terminal.
Parameters:
tape(TapeDocument): The parsed document to execute.options(TapePlaybackOptions): Playback, capture, and default-shell configuration.cancellationToken(CancellationToken): Cancellation for preparation and playback.
Returns: Task<TapeExecutionResult>
The final snapshot captured before cleanup, finalized artifacts, and any naturally observed workload exit code.
public Task<TapeExecutionResult> PlayAsync(TapeDocument tape, TapePlaybackOptions? options = null, CancellationToken cancellationToken = default)ValidateAsync(TapeDocument, Hex1bTerminal, TapePlaybackOptions?, CancellationToken)
Resolves and validates a tape without sending input, resizing, or creating output files.
Parameters:
tape(TapeDocument): The parsed document to prepare.terminal(Hex1bTerminal): The caller-owned target terminal.options(TapePlaybackOptions): Playback and capture configuration.cancellationToken(CancellationToken): Cancellation for preparation.
Returns: Task<TapeValidationResult>
All preparation diagnostics and whether execution is supported.
public Task<TapeValidationResult> ValidateAsync(TapeDocument tape, Hex1bTerminal terminal, TapePlaybackOptions? options = null, CancellationToken cancellationToken = default)ValidateAsync(TapeDocument, TapePlaybackOptions?, CancellationToken)
Validates playback configuration without building a terminal, launching a workload, or creating captures.
Parameters:
tape(TapeDocument): The parsed document to prepare.options(TapePlaybackOptions): Playback, capture, and default-shell configuration.cancellationToken(CancellationToken): Cancellation for preparation.
Returns: Task<TapeValidationResult>
Preparation diagnostics. With a custom factory, workload-dependent checks are deferred to playback and a warning reports that limitation.
public Task<TapeValidationResult> ValidateAsync(TapeDocument tape, TapePlaybackOptions? options = null, CancellationToken cancellationToken = default)Remarks
Passing a terminal borrows it; otherwise the options' factory creates an owned terminal. Disposing a result releases only its final snapshot.