Skip to content

Class Document

Definition

Namespace: StardewUI.Framework.Dom
Assembly: StardewUI.dll

A standalone StarML document.

public record Document : IEquatable<StardewUI.Framework.Dom.Document>

Inheritance
Object ⇦ Document

Implements
IEquatable<Document>

Members

Constructors

Name Description
Document(SNode, IReadOnlyList<SNode>) A standalone StarML document.

Properties

Name Description
EqualityContract
Root The primary content node.
Templates List of template nodes for inline expansion.

Methods

Name Description
Parse(ReadOnlySpan<Char>) Parses a Document from its original markup text.

Details

Constructors

Document(SNode, IReadOnlyList<SNode>)

A standalone StarML document.

public Document(StardewUI.Framework.Dom.SNode Root, System.Collections.Generic.IReadOnlyList<StardewUI.Framework.Dom.SNode> Templates);
Parameters

Root   SNode
The primary content node.

Templates   IReadOnlyList<SNode>
List of template nodes for inline expansion.


Properties

EqualityContract

protected System.Type EqualityContract { get; }
Property Value

Type


Root

The primary content node.

public StardewUI.Framework.Dom.SNode Root { get; set; }
Property Value

SNode


Templates

List of template nodes for inline expansion.

public System.Collections.Generic.IReadOnlyList<StardewUI.Framework.Dom.SNode> Templates { get; set; }
Property Value

IReadOnlyList<SNode>


Methods

Parse(ReadOnlySpan<Char>)

Parses a Document from its original markup text.

public static StardewUI.Framework.Dom.Document Parse(ReadOnlySpan<System.Char> text);
Parameters

text   ReadOnlySpan<Char>
The StarML markup text.

Returns

Document

The parsed document as a DOM tree.