Table of Contents

Class NodePositionChecker

Namespace
DialogueDown.Playbook.Checking
Assembly
DialogueDown.Playbook.dll

Refuses a playbook whose nodes are not where they say they are.

public sealed class NodePositionChecker : IPlaybookChecker
Inheritance
NodePositionChecker
Implements
Inherited Members

Remarks

A node's id is its position. The compiler's own node identity is an opaque handle, so writing a playbook renumbers every node into a dense index — which turns an identity you can only look up into an address you can check.

This is that check, and it is the one every other index in the document rests on. One comparison per node proves the ids are unique, gapless, and in order all at once. Skip it and a reordered node list — from a merge, a formatter, a well-meaning tool — silently redirects every edge that names a node: the story still plays, just not the one that was written.

Methods

Check(PlaybookDocument)

Checks a playbook, and says nothing when it passes.