|
LeanCloud C# SDK
|
LCIMClient is a local representation of realtime client in LeanCloud. More...
Public Member Functions | |
| LCIMClient (string clientId, string tag=null, string deviceId=null, ILCIMSignatureFactory signatureFactory=null) | |
| Constructs a LCIMClient with client id. | |
| LCIMClient (LCUser user, string tag=null, string deviceId=null, ILCIMSignatureFactory signatureFactory=null) | |
| Constructs a LCIMClient with a LCUser. | |
| async Task | Open (bool force=true) |
| Signing in. | |
| async Task | Close () |
| Closes the session. | |
| async Task< LCIMConversation > | CreateConversation (IEnumerable< string > members, string name=null, bool unique=true, Dictionary< string, object > properties=null) |
| Creates a conversation. | |
| async Task< LCIMChatRoom > | CreateChatRoom (string name, Dictionary< string, object > properties=null) |
| Creates a chatroom. | |
| async Task< LCIMTemporaryConversation > | CreateTemporaryConversation (IEnumerable< string > members, int ttl=86400, Dictionary< string, object > properties=null) |
| Creates a temporary conversation. | |
| async Task< LCIMConversation > | GetConversation (string id) |
| Queries a conversation based on its id. | |
| async Task< ReadOnlyCollection< LCIMConversation > > | GetConversationList (IEnumerable< string > ids) |
| Queries conversations based on their ids. | |
| LCIMConversationQuery | GetQuery () |
| Constructs a conversation query. | |
Public Attributes | |
| Action< LCIMConversation, string > | OnMuted |
| Occurs when the current user is muted in a conversation. | |
| Action< LCIMConversation, string > | OnUnmuted |
| Occurs when the current user is unmuted in a conversation. | |
| Action< LCIMConversation, ReadOnlyDictionary< string, object >, string > | OnConversationInfoUpdated |
| Occurs when the properties of a conversation are updated. | |
| Action< LCIMConversation, string, string, string > | OnMemberInfoUpdated |
| Occurs when the properties of someone are updated. | |
Properties | |
| string | Id [get] |
| Client Id. | |
| string | Tag [get] |
| Client tag. | |
| string | DeviceId [get] |
| Device Id. | |
| Action | OnPaused [get, set] |
| Occurs when the connection is lost. | |
| Action | OnResume [get, set] |
| Occurs when the connection is recovered. | |
| Action< int, string > | OnClose [get, set] |
| Occurs when the connection is closed and there will be no auto reconnection. Possible causes include there is a single device login conflict or the client has been kicked off by the server. | |
| Action< LCIMConversation, string > | OnBlocked [get, set] |
| Occurs when the current user is added into the blacklist of a conversation. | |
| Action< LCIMConversation, string > | OnUnblocked [get, set] |
| Occurs when the current user is removed from the blacklist of a conversation. | |
| Action< LCIMConversation, string > | OnInvited [get, set] |
| Occurs when the current user is invited to a conversation. | |
| Action< LCIMConversation, string > | OnKicked [get, set] |
| Occurs when the current user is kicked from a conversation. | |
| Action< LCIMConversation, ReadOnlyCollection< string >, string > | OnMembersJoined [get, set] |
| Occurs when a user joined a conversation. | |
| Action< LCIMConversation, ReadOnlyCollection< string >, string > | OnMembersLeft [get, set] |
| Occurs when a user left a conversation. | |
| Action< LCIMConversation, ReadOnlyCollection< string >, string > | OnMembersBlocked [get, set] |
| Occurs when a user is added to the blacklist of a conversation. | |
| Action< LCIMConversation, ReadOnlyCollection< string >, string > | OnMembersUnblocked [get, set] |
| Occurs when a user is removed from the blacklist of a conversation. | |
| Action< LCIMConversation, ReadOnlyCollection< string >, string > | OnMembersMuted [get, set] |
| Occurs when a user is muted in a conversation. | |
| Action< LCIMConversation, ReadOnlyCollection< string >, string > | OnMembersUnmuted [get, set] |
| Occurs when a user is unmuted in a conversation. | |
| Action< LCIMConversation, LCIMMessage > | OnMessage [get, set] |
| Occurs when a new message is delivered to a conversation the current user is already in. | |
| Action< LCIMConversation, LCIMRecalledMessage > | OnMessageRecalled [get, set] |
| Occurs when a message is recalled. | |
| Action< LCIMConversation, LCIMMessage > | OnMessageUpdated [get, set] |
| Occurs when a message is updated. | |
| Action< LCIMConversation, string > | OnMessageDelivered [get, set] |
| Occurs when a message is delivered. | |
| Action< LCIMConversation, string > | OnMessageRead [get, set] |
| Occurs when a message is read. | |
| Action< ReadOnlyCollection< LCIMConversation > > | OnUnreadMessagesCountUpdated [get, set] |
| Occurs when the number of unreadMessagesCount is updatded. | |
| Action< LCIMConversation > | OnLastDeliveredAtUpdated [get, set] |
| Occurs when the last delivered message is updated. | |
| Action< LCIMConversation > | OnLastReadAtUpdated [get, set] |
| Occurs when the last read message is updated. | |
LCIMClient is a local representation of realtime client in LeanCloud.
|
inline |
Constructs a LCIMClient with client id.
| clientId | |
| tag | |
| deviceId | |
| signatureFactory |
|
inline |
Constructs a LCIMClient with a LCUser.
| user | |
| tag | |
| deviceId | |
| signatureFactory |
|
inline |
Closes the session.
|
inline |
Creates a chatroom.
| name | The name of this chatroom |
| properties | Custom attributes of this chatroom |
|
inline |
Creates a conversation.
| members | The list of clientIds of participants in this conversation (except the creator) |
| name | The name of this conversation |
| unique | Whether this conversation is unique; if it is true and an existing conversation contains the same composition of members, the existing conversation will be reused, otherwise a new conversation will be created. |
| properties | Custom attributes of this conversation |
|
inline |
Creates a temporary conversation.
| members | The list of clientIds of participants in this temporary conversation (except the creator) |
| ttl | TTL of this temporary conversation |
| properties | Custom attributes of this temporary conversation |
|
inline |
Queries a conversation based on its id.
| id | objectId |
|
inline |
Queries conversations based on their ids.
| ids | objectId list |
|
inline |
Constructs a conversation query.
|
inline |
Signing in.
| force | If this is ture (default value), and single device sign-on is enabled, users already logged in on another device with the same tag will be logged out. |
| Action<LCIMConversation, ReadOnlyDictionary<string, object>, string> LeanCloud.Realtime.LCIMClient.OnConversationInfoUpdated |
Occurs when the properties of a conversation are updated.
| Action<LCIMConversation, string, string, string> LeanCloud.Realtime.LCIMClient.OnMemberInfoUpdated |
Occurs when the properties of someone are updated.
| Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnMuted |
Occurs when the current user is muted in a conversation.
| Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnUnmuted |
Occurs when the current user is unmuted in a conversation.
|
get |
Device Id.
|
get |
Client Id.
|
getset |
Occurs when the current user is added into the blacklist of a conversation.
|
getset |
Occurs when the connection is closed and there will be no auto reconnection. Possible causes include there is a single device login conflict or the client has been kicked off by the server.
|
getset |
Occurs when the current user is invited to a conversation.
|
getset |
Occurs when the current user is kicked from a conversation.
|
getset |
Occurs when the last delivered message is updated.
|
getset |
Occurs when the last read message is updated.
|
getset |
Occurs when a user is added to the blacklist of a conversation.
|
getset |
Occurs when a user joined a conversation.
|
getset |
Occurs when a user left a conversation.
|
getset |
Occurs when a user is muted in a conversation.
|
getset |
Occurs when a user is removed from the blacklist of a conversation.
|
getset |
Occurs when a user is unmuted in a conversation.
|
getset |
Occurs when a new message is delivered to a conversation the current user is already in.
|
getset |
Occurs when a message is delivered.
|
getset |
Occurs when a message is read.
|
getset |
Occurs when a message is recalled.
|
getset |
Occurs when a message is updated.
|
getset |
Occurs when the connection is lost.
|
getset |
Occurs when the connection is recovered.
|
getset |
Occurs when the current user is removed from the blacklist of a conversation.
|
getset |
Occurs when the number of unreadMessagesCount is updatded.
|
get |
Client tag.