| Unity and Windows API reference
    | 
| Public 成员函数 | |
| Message (IMessageBody body=null) | |
| 静态 Public 成员函数 | |
| static Message | CreateReceiveMessage () | 
| static Message | CreateSendMessage (string to, IMessageBody body, MessageDirection direction=MessageDirection.SEND, bool hasRead=true) | 
| static Message | CreateTextSendMessage (string username, string content) | 
| static Message | CreateFileSendMessage (string username, string localPath, string displayName="", long fileSize=0) | 
| static Message | CreateImageSendMessage (string username, string localPath, string displayName="", long fileSize=0, bool original=false, double width=0, double height=0) | 
| static Message | CreateVideoSendMessage (string username, string localPath, string displayName="", string thumbnailLocalPath="", long fileSize=0, int duration=0, double width=0, double height=0) | 
| static Message | CreateVoiceSendMessage (string username, string localPath, string displayName="", long fileSize=0, int duration=0) | 
| static Message | CreateLocationSendMessage (string username, double latitude, double longitude, string address="", string buildingName="") | 
| static Message | CreateCmdSendMessage (string username, string action, bool deliverOnlineOnly=false) | 
| static Message | CreateCustomSendMessage (string username, string customEvent, Dictionary< string, string > customParams=null) | 
| static AttributeValueType | GetAttributeValueType (AttributeValue value) | 
| static void | SetAttribute (Dictionary< string, AttributeValue > arriMap, string key, in object value, AttributeValueType type) | 
| static T | GetAttributeValue< T > (AttributeValue value, out bool found) | 
| static T | GetAttributeValue< T > (Dictionary< string, AttributeValue > arriMap, string key, out bool found) | 
| Public 属性 | |
| string | MsgId = ((long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds)).ToString() | 
| string | ConversationId = "" | 
| string | From = "" | 
| string | To = "" | 
| MessageType | MessageType | 
| MessageDirection | Direction | 
| MessageStatus | Status | 
| long | LocalTime = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds) | 
| long | ServerTime = 0 | 
| bool | HasDeliverAck = false | 
| bool | HasReadAck = false | 
| bool | IsNeedGroupAck = false | 
| bool | IsRead = false | 
| bool | MessageOnlineState = false | 
| IMessageBody | Body | 
| Dictionary< string, AttributeValue > | Attributes | 
| bool | IsThread = false | 
| 属性 | |
| int | GroupAckCount  [get] | 
| List< MessageReaction > | ReactionList  [get] | 
| ChatThread | ChatThread  [get] | 
消息类,用于定义一条要发送或接收的消息。
| 
 | static | 
创建一条接收的消息。
| 
 | static | 
创建一条发送的消息。
| to | 消息接收方 ID。 | 
| body | 消息体。 | 
| direction | 消息方向,设置为 SEND。
 | 
| hasRead | 是否需要已读回执。 | 
| 
 | static | 
创建一条文本发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| content | 文本内容。 | 
| 
 | static | 
创建一条文件发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| localPath | 文件的本地路径。 | 
| displayName | 文件的显示名称。 | 
| fileSize | 文件大小,单位为字节。 | 
| 
 | static | 
创建一条图片发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| localPath | 图片的本地路径。 | 
| displayName | 图片的显示名称。 | 
| fileSize | 图片大小,单位为字节。 | 
| original | 是否发送原图。 
 | 
| width | 图片宽度,单位为像素。 | 
| heigh | 图片高度,单位为像素。 | 
| 
 | static | 
创建一条视频发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| localPath | 视频文件的 URI。 | 
| displayName | 视频文件的显示名称。 | 
| thumbnailLocalPath | 缩略图的本地路径。 | 
| fileSize | 视频文件的大小,单位为字节。 | 
| duration | 视频时间长度,单位为秒。 | 
| width | 视频宽度,单位为像素。 | 
| heigh | 视频高度,单位为像素。 | 
| 
 | static | 
创建一条语音发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| localPath | 语音文件的本地路径。 | 
| displayName | 语音文件的显示名称。 | 
| fileSize | 语音文件的大小,单位为字节。 | 
| duration | 语音时间长度,单位为秒。 | 
| 
 | static | 
创建一条位置发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| latitude | 纬度。 | 
| longitude | 经度。 | 
| address | 位置详情。 | 
| buildingName | 建筑物名称。 | 
| 
 | static | 
创建一条命令发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| action | 命令内容。 
 | 
| 
 | static | 
创建一条自定义发送消息。
| username | 消息接收者的用户 ID 或群组 ID。 | 
| customEvent | 自定义事件。 | 
| customParams | 自定义参数字典。 | 
| 
 | static | 
获取扩展属性的类型。
| value | 扩展属性实例。 | 
| 
 | static | 
设置单个扩展属性。
| arriMap | 要新增扩展属性的字典。 | 
| key | 新增扩展属性的关键字。 | 
| type | 扩展属性的类型。 | 
| value | 扩展属性的值。 | 
| 
 | static | 
获取单个扩展属性的泛型类型 T 的数据。
| value | 扩展属性的值。 | 
| found | 扩展属性的值中是否包含泛型类型 T 的数据。 | 
found 为 true 时,返回泛型类型 T 的数据found 为 false 时,返回 null。 | 
 | static | 
从扩展属性字典中获取单个扩展属性的泛型类型 T 的数据。
| arriMap | 扩展属性字典。 | 
| key | 扩展属性在字典中的关键字。 | 
| found | 扩展属性的值中是否包含泛型类型 T 的数据。 | 
found 为 true 时,返回泛型类型 T 的数据found 为 false 时,返回 null。 | string ChatSDK.Message.MsgId = ((long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds)).ToString() | 
消息的 ID。
| string ChatSDK.Message.ConversationId = "" | 
消息所属会话的 ID。
| string ChatSDK.Message.From = "" | 
消息发送者的 ID。
| string ChatSDK.Message.To = "" | 
消息接收者的用户 ID 或群组 ID。
| MessageType ChatSDK.Message.MessageType | 
| MessageDirection ChatSDK.Message.Direction | 
| MessageStatus ChatSDK.Message.Status | 
消息的状态,包含以下状态:
CREATE:消息已创建;PROGRESS:消息正在发送;SUCCESS:消息成功发送;FAIL:消息发送失败。 | long ChatSDK.Message.LocalTime = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds) | 
消息的本地创建 Unix 时间戳,单位为毫秒。
| long ChatSDK.Message.ServerTime = 0 | 
消息的服务器接收的 Unix 时间戳,单位为毫秒。
| bool ChatSDK.Message.HasDeliverAck = false | 
消息是否已送达对方。
true: 已送达;false: 未送达。 | bool ChatSDK.Message.HasReadAck = false | 
消息是否已读。
true: 已读;false: 未读。 | bool ChatSDK.Message.IsNeedGroupAck = false | 
设置消息是否需要群组已读回执。
| need | - true:需要已读回执;
 | 
| bool ChatSDK.Message.IsRead = false | 
消息是否已读。
IConversation#MarkAllMessageAsRead()。 | bool ChatSDK.Message.MessageOnlineState = false | 
是否为在线消息。
true:是。false:是。 | IMessageBody ChatSDK.Message.Body | 
消息体。
| Dictionary<string, AttributeValue> ChatSDK.Message.Attributes | 
消息扩展。
| bool ChatSDK.Message.IsThread = false | 
设置及获取是否是 Thread 消息。
| 
 | get | 
获取群组消息回执数。
| 
 | get | 
获取 Reaction 列表。
| 
 | get | 
获取子区概览信息。