GeometryNode Struct

The GeometryNode union (https://drafts.csswg.org/cssom-view/#typedefdef-geometrynode): a Text, an Element, a CssPseudoElement or a Document.

public readonly struct GeometryNode : IEquatable<GeometryNode>
Implements

Properties

NameDescription
ValueGets the node: a Text, an Element, a CssPseudoElement or a Document.

Gets the node: a Text, an Element, a CssPseudoElement or a Document.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(GeometryNode)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromCssPseudoElement(CssPseudoElement)Creates a GeometryNode from a CSSPseudoElement.
FromDocument(Document)Creates a GeometryNode from a Document.
FromElement(Element)Creates a GeometryNode from an Element.
FromText(Text)Creates a GeometryNode from a Text.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(GeometryNode)

CssomView.GeometryUtils.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(GeometryNode other)
Parameters
other GeometryNode
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromCssPseudoElement(CssPseudoElement)

CssomView.GeometryUtils.cs

Creates a GeometryNode from a CSSPseudoElement.

public static GeometryNode FromCssPseudoElement(CssPseudoElement value)

Parameters

value CssPseudoElement

Returns

GeometryNode

FromDocument(Document)

CssomView.GeometryUtils.cs

Creates a GeometryNode from a Document.

public static GeometryNode FromDocument(Document value)

Parameters

value Document

Returns

GeometryNode

FromElement(Element)

CssomView.GeometryUtils.cs

Creates a GeometryNode from an Element.

public static GeometryNode FromElement(Element value)

Parameters

value Element

Returns

GeometryNode

Creates a GeometryNode from a Text.

public static GeometryNode FromText(Text value)

Parameters

value Text

Returns

GeometryNode

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Operators

NameDescription
operator ==(GeometryNode, GeometryNode)Determines whether two GeometryNode values are equal.
implicit operator GeometryNode(CssPseudoElement)Converts a CSSPseudoElement to a GeometryNode.
implicit operator GeometryNode(Document)Converts a Document to a GeometryNode.
implicit operator GeometryNode(Element)Converts an Element to a GeometryNode.
implicit operator GeometryNode(Text)Converts a Text to a GeometryNode.
operator !=(GeometryNode, GeometryNode)Determines whether two GeometryNode values are not equal.

operator ==(GeometryNode, GeometryNode)

CssomView.GeometryUtils.cs

Determines whether two GeometryNode values are equal.

public static bool operator ==(GeometryNode left, GeometryNode right)

Parameters

left GeometryNode
right GeometryNode

Returns

bool

op_Implicit overloads

implicit operator GeometryNode(CssPseudoElement)

CssomView.GeometryUtils.cs

Converts a CSSPseudoElement to a GeometryNode.

public static implicit operator GeometryNode(CssPseudoElement value)
Parameters
value CssPseudoElement
Returns

GeometryNode

implicit operator GeometryNode(Document)

CssomView.GeometryUtils.cs

Converts a Document to a GeometryNode.

public static implicit operator GeometryNode(Document value)
Parameters
value Document
Returns

GeometryNode

implicit operator GeometryNode(Element)

CssomView.GeometryUtils.cs

Converts an Element to a GeometryNode.

public static implicit operator GeometryNode(Element value)
Parameters
value Element
Returns

GeometryNode

implicit operator GeometryNode(Text)

CssomView.GeometryUtils.cs

Converts a Text to a GeometryNode.

public static implicit operator GeometryNode(Text value)
Parameters
value Text
Returns

GeometryNode

operator !=(GeometryNode, GeometryNode)

CssomView.GeometryUtils.cs

Determines whether two GeometryNode values are not equal.

public static bool operator !=(GeometryNode left, GeometryNode right)

Parameters

left GeometryNode
right GeometryNode

Returns

bool