Docs · API reference · Verso.Abstractions

LayoutReference Struct#

Identity pair for a layout, composed of the owning extension id and the layout id declared on the extension's ILayoutEngine. The pair is the only valid identity for a layout from v1.0 onward: LayoutId alone is not unique because two extensions may each register a layout with the same id.

public readonly record struct LayoutReference : System.IEquatable<Verso.Abstractions.LayoutReference>

Implements System.IEquatable<LayoutReference>

Constructors#

LayoutReference(string, string) Constructor#

Identity pair for a layout, composed of the owning extension id and the layout id declared on the extension's ILayoutEngine. The pair is the only valid identity for a layout from v1.0 onward: LayoutId alone is not unique because two extensions may each register a layout with the same id.

public LayoutReference(string ExtensionId, string LayoutId);

Parameters#

ExtensionId System.String

The ExtensionId of the extension that owns the layout. An empty string is reserved as a sentinel for unqualified legacy references that have not yet been resolved against the loaded extension set.

LayoutId System.String

The layout's LayoutId.

Properties#

ExtensionId Property#

The ExtensionId of the extension that owns the layout. An empty string is reserved as a sentinel for unqualified legacy references that have not yet been resolved against the loaded extension set.

public string ExtensionId { get; init; }

Property Value#

System.String

IsUnqualified Property#

True when this reference is missing its ExtensionId. This indicates a legacy bare-string activeLayout that has not yet been resolved against the loaded extension set.

public bool IsUnqualified { get; }

Property Value#

System.Boolean

LayoutId Property#

The layout's LayoutId.

public string LayoutId { get; init; }

Property Value#

System.String

Qualified Property#

The qualified string form "<extensionId>:<layoutId>" used as the key in the notebook's persisted layouts map.

public string Qualified { get; }

Property Value#

System.String

Methods#

TryParse(string, LayoutReference) Method#

Parses a qualified-string of the form "<extensionId>:<layoutId>". Returns false when the input has no colon or has empty parts. A bare layout id is treated as unqualified and returned with an empty ExtensionId.

public static bool TryParse(string? qualified, out Verso.Abstractions.LayoutReference reference);

Parameters#

qualified System.String

reference LayoutReference

Returns#

System.Boolean