Class ControllerSnapshotOptionsDefaults
- Namespace
- XBullet.EasyTesting.Snapshots
- Assembly
- XBullet.EasyTesting.Snapshots.Core.dll
Stores reusable controller snapshot options as a template. Each controller snapshot receives an independent copy, and explicitly supplied options are merged into the global template.
public sealed class ControllerSnapshotOptionsDefaults
- Inheritance
-
ControllerSnapshotOptionsDefaults
- Inherited Members
Constructors
ControllerSnapshotOptionsDefaults(Action<ControllerSnapshotOptions>)
Creates reusable defaults from a one-time configuration callback.
public ControllerSnapshotOptionsDefaults(Action<ControllerSnapshotOptions> configure)
Parameters
configureAction<ControllerSnapshotOptions>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 controller snapshots. Configure this once while the test assembly is initialized.
public static ControllerSnapshotOptionsDefaults? Global { get; set; }
Property Value
- ControllerSnapshotOptionsDefaults
The process-wide defaults template, or null to use package defaults. Reads and writes are atomic.
Methods
Create(Action<ControllerSnapshotOptions>?)
Creates an independent options object and optionally applies local overrides.
public ControllerSnapshotOptions Create(Action<ControllerSnapshotOptions>? configure = null)
Parameters
configureAction<ControllerSnapshotOptions>Optional callback invoked once with the copied mutable options. null applies no overrides.
Returns
- ControllerSnapshotOptions
A new caller-owned mutable options object; changing it does not change this template.
ExtendGlobal(Action<ControllerSnapshotOptions>)
Creates options from the global template, or package defaults when no global template is configured, and then applies per-assertion configuration.
public static ControllerSnapshotOptions ExtendGlobal(Action<ControllerSnapshotOptions> configure)
Parameters
configureAction<ControllerSnapshotOptions>Non-null callback invoked once with the new mutable options after global or package defaults are applied.
Returns
- ControllerSnapshotOptions
A new caller-owned mutable options object marked as already containing global defaults.