zplCore.comzplCore.com

DryRunPrinterConnection

public sealed class DryRunPrinterConnection : IPrinterConnection, IAsyncDisposable

Dry-run connection (PrinterSettings.EnablePrinting = false): records everything that would be sent, prints nothing. Queries return null.

Constructors

SignatureDescription
# DryRunPrinterConnection()

Properties

PropertyTypeDescription
Jobs { get; }IReadOnlyList<byte[]>Snapshot of the recorded jobs (one entry per SendAsync call).
Target { get; init; }stringOptional connection that would have been used (for diagnostics).
Text { get; }stringAll recorded data decoded as UTF-8.

Methods

Method SignatureReturnsDescription
# DisposeAsync()ValueTask
# QueryAsync(string command, TimeSpan timeout, CancellationToken ct = default)Task<string>
# SendAsync(byte[] data, CancellationToken ct = default)Task