Table of Contents

Class KMarkdownElement

Namespace
Kook
Assembly
Kook.Net.Core.dll

KMarkdown 文本元素,可用于 IModule 中。

public class KMarkdownElement : IElement, IEquatable<KMarkdownElement>, IEquatable<IElement>
Inheritance
KMarkdownElement
Implements
Inherited Members
Extension Methods

Properties

Content

获取 KMarkdown 文本的内容。

public string Content { get; }

Property Value

string

Type

获取元素的类型。

public ElementType Type { get; }

Property Value

ElementType

Methods

Equals(KMarkdownElement?)

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

public bool Equals(KMarkdownElement? kMarkdownElement)

Parameters

kMarkdownElement KMarkdownElement

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.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(KMarkdownElement?, KMarkdownElement?)

判定两个 KMarkdownElement 是否相等。

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

Parameters

left KMarkdownElement
right KMarkdownElement

Returns

bool

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

operator !=(KMarkdownElement?, KMarkdownElement?)

判定两个 KMarkdownElement 是否不相等。

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

Parameters

left KMarkdownElement
right KMarkdownElement

Returns

bool

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