Table of Contents

Class Emoji

Namespace
HeyBox
Assembly
HeyBox.Net.Core.dll

表示一个内置的 Emoji 表情符号。

public class Emoji : Emote, IEmote, IEquatable<Emote>, IEquatable<Emoji>, IEntity<string>
Inheritance
Emoji
Implements
Inherited Members

Constructors

Emoji(string, string)

初始化一个 Emoji 的新实例。

public Emoji(string group, string name)

Parameters

group string

表情符号的分组。

name string

表情符号的名称。

Methods

Equals(Emoji?)

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

public bool Equals(Emoji? other)

Parameters

other Emoji

An object to compare with this object.

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.

Parse(string)

尝试从一个表情符号的原始格式中解析出一个 Emoji

public static Emoji Parse(string text)

Parameters

text string

表情符号的原始格式。例如 [cube_摸摸头]

Returns

Emoji

解析出的 Emoji

Exceptions

ArgumentException

无法解析 text 为一个有效的表情符号。

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryParse(string, out Emoji?)

从一个表情符号的原始格式中解析出一个 Emoji

public static bool TryParse(string text, out Emoji? result)

Parameters

text string

表情符号的原始格式。例如 [cube_摸摸头]

result Emoji

如果解析成功,则为解析出的 Emoji

Returns

bool

如果解析成功,则为 true;否则为 false