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
Methods
Equals(Emoji?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Emoji? other)
Parameters
other
EmojiAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
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
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
Returns
- bool
如果解析成功,则为
true
;否则为false
。