Class HttpExchangeSnapshotOptionsDefaults

Namespace
XBullet.EasyTesting.Snapshots
Assembly
XBullet.EasyTesting.Snapshots.Core.dll

Stores reusable HTTP exchange snapshot options as a template. Each exchange snapshot receives an independent copy, and explicitly supplied options are merged into the global template.

public sealed class HttpExchangeSnapshotOptionsDefaults
Inheritance
HttpExchangeSnapshotOptionsDefaults
Inherited Members

Constructors

HttpExchangeSnapshotOptionsDefaults(Action<HttpExchangeSnapshotOptions>)

Creates reusable defaults from a one-time configuration callback.

public HttpExchangeSnapshotOptionsDefaults(Action<HttpExchangeSnapshotOptions> configure)

Parameters

configure Action<HttpExchangeSnapshotOptions>

Non-null callback invoked once immediately with a new mutable template. The callback is not retained.

Properties

Global

Gets or sets the optional defaults used as the base for HTTP exchange snapshots. Configure this once while the test assembly is initialized.

public static HttpExchangeSnapshotOptionsDefaults? Global { get; set; }

Property Value

HttpExchangeSnapshotOptionsDefaults

The process-wide defaults template, or null to use package defaults. Reads and writes are atomic.

Methods

Create(Action<HttpExchangeSnapshotOptions>?)

Creates an independent options object and optionally applies local overrides.

public HttpExchangeSnapshotOptions Create(Action<HttpExchangeSnapshotOptions>? configure = null)

Parameters

configure Action<HttpExchangeSnapshotOptions>

Optional callback invoked once with the copied mutable options. null applies no overrides.

Returns

HttpExchangeSnapshotOptions

A new caller-owned mutable options object; changing it does not change this template.

ExtendGlobal(Action<HttpExchangeSnapshotOptions>)

Creates options from the global template, or package defaults when no global template is configured, and then applies per-assertion configuration.

public static HttpExchangeSnapshotOptions ExtendGlobal(Action<HttpExchangeSnapshotOptions> configure)

Parameters

configure Action<HttpExchangeSnapshotOptions>

Non-null callback invoked once with the new mutable options after global or package defaults are applied.

Returns

HttpExchangeSnapshotOptions

A new caller-owned mutable options object marked as already containing global defaults.