Table of Contents

Class Card

Namespace
Kook
Assembly
Kook.Net.Core.dll

表示一个卡片对象,可用于卡片消息。

public class Card : ICard, IEquatable<Card>, IEquatable<ICard>
Inheritance
Card
Implements
Inherited Members
Extension Methods

Properties

Color

获取卡片侧边的颜色。

public Color? Color { get; }

Property Value

Color?

ModuleCount

获取卡片中模块的数量。

public int ModuleCount { get; }

Property Value

int

Modules

获取卡片的模块。

public ImmutableArray<IModule> Modules { get; }

Property Value

ImmutableArray<IModule>

Size

获取卡片的大小。

public CardSize Size { get; }

Property Value

CardSize

Theme

获取卡片的主题。

public CardTheme Theme { get; }

Property Value

CardTheme

Type

获取卡片的类型。

public CardType Type { get; }

Property Value

CardType

Methods

Equals(Card?)

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

public bool Equals(Card? card)

Parameters

card Card

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 ==(Card, Card)

判定两个 Card 是否相等。

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

Parameters

left Card
right Card

Returns

bool

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

operator !=(Card, Card)

判定两个 Card 是否不相等。

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

Parameters

left Card
right Card

Returns

bool

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