Vixen
02b45cc4
csharp
public sealed class HarnessDocument

A declared variation run, open for editing and for running.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The thresholds are the reason the file exists: numbers written into a test are numbers the person authoring the clip cannot see and will not believe. Editing them is what this document is for; running the plan is what makes the numbers mean something while they are being chosen.

⚠ The clip, the rig and the shapes are supplied, not loaded. The plan names them by path and this document cannot reach another asset — the same split ProxyShapeDocument makes. A host that has a project wires Resolve; without one the plan is still editable and TryRun says what it is missing rather than throwing.

Fields and properties (7)

  • public const string Extension

    What a declared run is written as.

  • public string AssetPath

    Where the file is, absolute.

  • public HarnessPlanContent Plan

    The declaration.

  • public string? LoadError

    Why the file would not read, or .

  • public Func<HarnessPlanContent, HarnessInputs?>? Resolve

    How the plan's asset paths are turned into the things it names.

  • public VariationReport? Report

    The last run, or if there has not been one.

  • public HarnessPlan? Ran

    The plan the last run used, which is what a drill-down rebuilds against.

Events (1)

  • public Action<HarnessDocument>? Changed

    Raised after anything changes the plan or a run finishes.

Methods (4)

  • public HarnessDocument(EditorProject project, AssetId asset, string path)

    Opens a plan.

  • public void Set<T>(string label, Func<HarnessPlanContent, T> read, Action<HarnessPlanContent, T> write, T value)

    Changes one of the plan's numbers, undoably.

  • public bool TryRun(out string why)

    Runs the plan, if everything it names could be found.

  • protected override void SaveCore()

    Writes the document back to wherever it came from.

Used by (5)

  • AnimationBinderVixen.Editor.AssetEditors
  • AnimationWiringTestsVixen.Editor.App.Tests
  • HarnessEditorFactoryVixen.Editor.AssetEditors
  • HarnessViewTestsVixen.Editor.AssetEditors.Tests
  • VariationHarnessViewVixen.Editor.AssetEditors