Class Element
Inheritance
System.Object
Element
Assembly: cqhttp.Cyan.dll
Syntax
public class Element : object
Constructors
|
Improve this Doc
View Source
Element(String, Dictionary<String, String>)
Declaration
public Element(string type, Dictionary<string, string> dict)
Parameters
Type |
Name |
Description |
System.String |
type |
消息段类型
|
Dictionary<System.String, System.String> |
dict |
消息段键值对
|
|
Improve this Doc
View Source
Element(String, (String key, String value)[])
Declaration
public Element(string type, params (string key, string value)[] dict)
Parameters
Type |
Name |
Description |
System.String |
type |
消息段类型
|
System.ValueTuple<System.String, System.String>[] |
dict |
手动输入的键值对
|
Fields
|
Improve this Doc
View Source
isSingle
Declaration
Field Value
Type |
Description |
System.Boolean |
|
Properties
|
Improve this Doc
View Source
data
represents the true message
Declaration
public virtual Dictionary<string, string> data { get; }
Property Value
Type |
Description |
Dictionary<System.String, System.String> |
|
|
Improve this Doc
View Source
type
Declaration
public string type { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object b)
Parameters
Type |
Name |
Description |
System.Object |
b |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetElement(String, Dictionary<String, String>)
Declaration
public static Element GetElement(string type, Dictionary<string, string> dict)
Parameters
Type |
Name |
Description |
System.String |
type |
|
Dictionary<System.String, System.String> |
dict |
|
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToString()
将消息段序列化为CQ码格式,即酷Q原生消息格式
https://d.cqp.me/Pro/CQ码
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
CQCode
|
Operators
|
Improve this Doc
View Source
Addition(Element, Element)
Declaration
public static Message operator +(Element a, Element b)
Parameters
Returns
|
Improve this Doc
View Source
Equality(Element, Element)
Declaration
public static bool operator ==(Element a, Element b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Inequality(Element, Element)
Declaration
public static bool operator !=(Element a, Element b)
Parameters
Returns
Type |
Description |
System.Boolean |
|