Table of Contents

Class ImageNode

Namespace
HeyBox
Assembly
HeyBox.Net.Core.dll

图片节点,可用于 IModule 中。

public class ImageNode : INode, IEquatable<ImageNode>, IEquatable<INode>
Inheritance
ImageNode
Implements
Inherited Members
Extension Methods

Properties

Size

获取图片的尺寸。

public ImageSize? Size { get; }

Property Value

ImageSize?

Remarks

图片的尺寸仅定义在 SectionModule 中,ImagesModule 中此属性为 null

Type

获取节点的类型。

public NodeType Type { get; }

Property Value

NodeType

Url

获取图片的 URL。

public string Url { get; }

Property Value

string

Width

获取节点的宽度。

public NodeWidth? Width { get; }

Property Value

NodeWidth?

Methods

Equals(ImageNode?)

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

public bool Equals(ImageNode? imageNode)

Parameters

imageNode ImageNode

Returns

bool

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

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Operators

operator ==(ImageNode?, ImageNode?)

判定两个 ImageNode 是否相等。

public static bool operator ==(ImageNode? left, ImageNode? right)

Parameters

left ImageNode
right ImageNode

Returns

bool

如果两个 ImageNode 相等,则为 true;否则为 false

operator !=(ImageNode?, ImageNode?)

判定两个 ImageNode 是否不相等。

public static bool operator !=(ImageNode? left, ImageNode? right)

Parameters

left ImageNode
right ImageNode

Returns

bool

如果两个 ImageNode 不相等,则为 true;否则为 false