Skip to content

Class SNode

Definition

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

A node in a StarML document, encapsulating the tag, its attributes, and all child nodes.

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

Inheritance
Object ⇦ SNode

Implements
IEquatable<SNode>

Remarks

This is also the root of a Document and the visible result of a parser. While there is some memory and performance cost associated with this intermediate representation before assembling the ViewNode, it allows for document assets to be edited (patched) prior to binding.

Members

Constructors

Name Description
SNode(SElement, IReadOnlyList<SNode>) A node in a StarML document, encapsulating the tag, its attributes, and all child nodes.

Properties

Name Description
Attributes Gets the attributes of the associated Element.
ChildNodes The children of this node.
Element The element data for this node.
EqualityContract
Tag Gets the tag of the associated Element.

Details

Constructors

SNode(SElement, IReadOnlyList<SNode>)

A node in a StarML document, encapsulating the tag, its attributes, and all child nodes.

public SNode(StardewUI.Framework.Dom.SElement Element, System.Collections.Generic.IReadOnlyList<StardewUI.Framework.Dom.SNode> ChildNodes);
Parameters

Element   SElement
The element data for this node.

ChildNodes   IReadOnlyList<SNode>
The children of this node.

Remarks

This is also the root of a Document and the visible result of a parser. While there is some memory and performance cost associated with this intermediate representation before assembling the ViewNode, it allows for document assets to be edited (patched) prior to binding.


Properties

Attributes

Gets the attributes of the associated Element.

public System.Collections.Generic.IReadOnlyList<StardewUI.Framework.Dom.SAttribute> Attributes { get; }
Property Value

IReadOnlyList<SAttribute>


ChildNodes

The children of this node.

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

IReadOnlyList<SNode>


Element

The element data for this node.

public StardewUI.Framework.Dom.SElement Element { get; set; }
Property Value

SElement


EqualityContract

protected System.Type EqualityContract { get; }
Property Value

Type


Tag

Gets the tag of the associated Element.

public string Tag { get; }
Property Value

string