Back to API Reference
Class
RangeSource
abstract
Base class for serialized and runtime producers of text range entities.
Derived Types(3)
Types that inherit from RangeSource.
CCC
FixedRangeSource
Serialized source for a small authored set of codepoint ranges. Runtime-generated or frequently changing sets belong in MutableRangeSource.
MutableRangeSource
Runtime-owned range source for search results, diagnostics, annotations and other externally produced ranges. Changes become visible through atomic transactions.
ParseRule
Base class for text parsing rules that identify modifier application ranges.
public RangeSourceId RuntimeId{ get }Runtime identity used with source-local RangeId values.
public TextSnapshot Snapshot{ get }The rendered-text snapshot against which this source currently resolves positions. It is invalid until the source has participated in its owner's first parse.
protected virtual void CollectRanges(in TextSnapshot currentSnapshot, RangeMatchWriter writer)Emits this source's immutable range snapshot. Implementations must not retain writer or mutable references used to construct a match.
protected virtual void OnSnapshotChanged(in TextSnapshot previous, in TextSnapshot current)Updates source-owned anchors after rendered text changes. Snapshot-bound sources may reject or clear old results; tracking sources may remap them through the detected edit.
public Action ChangedOccurs after this source atomically changes its range set.
