LeanCloud C# SDK
Public Member Functions | Public Attributes | Properties | List of all members
LeanCloud.Realtime.LCIMClient Class Reference

Public Member Functions

 LCIMClient (string clientId, string tag=null, string deviceId=null, ILCIMSignatureFactory signatureFactory=null)
 
 LCIMClient (LCUser user, string tag=null, string deviceId=null, ILCIMSignatureFactory signatureFactory=null)
 
async Task Open (bool force=true)
 Signing in More...
 
async Task Close ()
 Closes the session More...
 
async Task< LCIMConversationCreateConversation (IEnumerable< string > members, string name=null, bool unique=true, Dictionary< string, object > properties=null)
 Creates a conversation More...
 
async Task< LCIMChatRoomCreateChatRoom (string name, Dictionary< string, object > properties=null)
 Creates a chatroom More...
 
async Task< LCIMTemporaryConversationCreateTemporaryConversation (IEnumerable< string > members, int ttl=86400, Dictionary< string, object > properties=null)
 Creates a temporary conversation More...
 
async Task< LCIMConversationGetConversation (string id)
 Queries a conversation based on its id. More...
 
async Task< ReadOnlyCollection< LCIMConversation > > GetConversationList (IEnumerable< string > ids)
 Queries conversations based on their ids. More...
 
LCIMConversationQuery GetQuery ()
 Constructs a conversation query. More...
 

Public Attributes

Action< LCIMConversation, string > OnMuted
 Occurs when the current user is muted in a conversation. More...
 
Action< LCIMConversation, string > OnUnmuted
 Occurs when the current user is unmuted in a conversation. More...
 
Action< LCIMConversation, ReadOnlyDictionary< string, object >, string > OnConversationInfoUpdated
 Occurs when the properties of a conversation are updated. More...
 
Action< LCIMConversation, string, string, string > OnMemberInfoUpdated
 Occurs when the properties of someone are updated. More...
 

Properties

string Id [get]
 Client Id More...
 
string Tag [get]
 Client tag More...
 
string DeviceId [get]
 
Action OnPaused [get, set]
 Occurs when the connection is lost. More...
 
Action OnResume [get, set]
 Occurs when the connection is recovered. More...
 
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. More...
 
Action< LCIMConversation, string > OnBlocked [get, set]
 Occurs when the current user is added into the blacklist of a conversation. More...
 
Action< LCIMConversation, string > OnUnblocked [get, set]
 Occurs when the current user is removed from the blacklist of a conversation. More...
 
Action< LCIMConversation, string > OnInvited [get, set]
 Occurs when the current user is invited to a conversation. More...
 
Action< LCIMConversation, string > OnKicked [get, set]
 Occurs when the current user is kicked from a conversation. More...
 
Action< LCIMConversation, ReadOnlyCollection< string >, string > OnMembersJoined [get, set]
 Occurs when a user joined a conversation. More...
 
Action< LCIMConversation, ReadOnlyCollection< string >, string > OnMembersLeft [get, set]
 Occurs when a user left a conversation. More...
 
Action< LCIMConversation, ReadOnlyCollection< string >, string > OnMembersBlocked [get, set]
 Occurs when a user is added to the blacklist of a conversation. More...
 
Action< LCIMConversation, ReadOnlyCollection< string >, string > OnMembersUnblocked [get, set]
 Occurs when a user is removed from the blacklist of a conversation. More...
 
Action< LCIMConversation, ReadOnlyCollection< string >, string > OnMembersMuted [get, set]
 Occurs when a user is muted in a conversation. More...
 
Action< LCIMConversation, ReadOnlyCollection< string >, string > OnMembersUnmuted [get, set]
 Occurs when a user is unmuted in a conversation. More...
 
Action< LCIMConversation, LCIMMessageOnMessage [get, set]
 Occurs when a new message is delivered to a conversation the current user is already in. More...
 
Action< LCIMConversation, LCIMRecalledMessageOnMessageRecalled [get, set]
 Occurs when a message is recalled. More...
 
Action< LCIMConversation, LCIMMessageOnMessageUpdated [get, set]
 Occurs when a message is updated. More...
 
Action< LCIMConversation, string > OnMessageDelivered [get, set]
 Occurs when a message is delivered. More...
 
Action< LCIMConversation, string > OnMessageRead [get, set]
 Occurs when a message is read. More...
 
Action< ReadOnlyCollection< LCIMConversation > > OnUnreadMessagesCountUpdated [get, set]
 Occurs when the number of unreadMessagesCount is updatded. More...
 
Action< LCIMConversationOnLastDeliveredAtUpdated [get, set]
 Occurs when the last delivered message is updated. More...
 
Action< LCIMConversationOnLastReadAtUpdated [get, set]
 Occurs when the last read message is updated. More...
 

Constructor & Destructor Documentation

LeanCloud.Realtime.LCIMClient.LCIMClient ( string  clientId,
string  tag = null,
string  deviceId = null,
ILCIMSignatureFactory  signatureFactory = null 
)
inline
LeanCloud.Realtime.LCIMClient.LCIMClient ( LCUser  user,
string  tag = null,
string  deviceId = null,
ILCIMSignatureFactory  signatureFactory = null 
)
inline

Member Function Documentation

async Task LeanCloud.Realtime.LCIMClient.Close ( )
inline

Closes the session

Returns
async Task<LCIMChatRoom> LeanCloud.Realtime.LCIMClient.CreateChatRoom ( string  name,
Dictionary< string, object >  properties = null 
)
inline

Creates a chatroom

Parameters
nameThe name of this chatroom
propertiesCustom attributes of this chatroom
Returns
async Task<LCIMConversation> LeanCloud.Realtime.LCIMClient.CreateConversation ( IEnumerable< string >  members,
string  name = null,
bool  unique = true,
Dictionary< string, object >  properties = null 
)
inline

Creates a conversation

Parameters
membersThe list of clientIds of participants in this conversation (except the creator)
nameThe name of this conversation
uniqueWhether 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.
propertiesCustom attributes of this conversation
Returns
async Task<LCIMTemporaryConversation> LeanCloud.Realtime.LCIMClient.CreateTemporaryConversation ( IEnumerable< string >  members,
int  ttl = 86400,
Dictionary< string, object >  properties = null 
)
inline

Creates a temporary conversation

Parameters
membersThe list of clientIds of participants in this temporary conversation (except the creator)
ttlTTL of this temporary conversation
propertiesCustom attributes of this temporary conversation
Returns
async Task<LCIMConversation> LeanCloud.Realtime.LCIMClient.GetConversation ( string  id)
inline

Queries a conversation based on its id.

Parameters
idobjectId
Returns
async Task<ReadOnlyCollection<LCIMConversation> > LeanCloud.Realtime.LCIMClient.GetConversationList ( IEnumerable< string >  ids)
inline

Queries conversations based on their ids.

Parameters
idsobjectId list
Returns
LCIMConversationQuery LeanCloud.Realtime.LCIMClient.GetQuery ( )
inline

Constructs a conversation query.

Returns
async Task LeanCloud.Realtime.LCIMClient.Open ( bool  force = true)
inline

Signing in

Parameters
forceIf 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.
Returns

Member Data Documentation

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.

Property Documentation

string LeanCloud.Realtime.LCIMClient.DeviceId
get
string LeanCloud.Realtime.LCIMClient.Id
get

Client Id

Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnBlocked
getset

Occurs when the current user is added into the blacklist of a conversation.

Action<int, string> LeanCloud.Realtime.LCIMClient.OnClose
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.

Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnInvited
getset

Occurs when the current user is invited to a conversation.

Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnKicked
getset

Occurs when the current user is kicked from a conversation.

Action<LCIMConversation> LeanCloud.Realtime.LCIMClient.OnLastDeliveredAtUpdated
getset

Occurs when the last delivered message is updated.

Action<LCIMConversation> LeanCloud.Realtime.LCIMClient.OnLastReadAtUpdated
getset

Occurs when the last read message is updated.

Action<LCIMConversation, ReadOnlyCollection<string>, string> LeanCloud.Realtime.LCIMClient.OnMembersBlocked
getset

Occurs when a user is added to the blacklist of a conversation.

Action<LCIMConversation, ReadOnlyCollection<string>, string> LeanCloud.Realtime.LCIMClient.OnMembersJoined
getset

Occurs when a user joined a conversation.

Action<LCIMConversation, ReadOnlyCollection<string>, string> LeanCloud.Realtime.LCIMClient.OnMembersLeft
getset

Occurs when a user left a conversation.

Action<LCIMConversation, ReadOnlyCollection<string>, string> LeanCloud.Realtime.LCIMClient.OnMembersMuted
getset

Occurs when a user is muted in a conversation.

Action<LCIMConversation, ReadOnlyCollection<string>, string> LeanCloud.Realtime.LCIMClient.OnMembersUnblocked
getset

Occurs when a user is removed from the blacklist of a conversation.

Action<LCIMConversation, ReadOnlyCollection<string>, string> LeanCloud.Realtime.LCIMClient.OnMembersUnmuted
getset

Occurs when a user is unmuted in a conversation.

Action<LCIMConversation, LCIMMessage> LeanCloud.Realtime.LCIMClient.OnMessage
getset

Occurs when a new message is delivered to a conversation the current user is already in.

Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnMessageDelivered
getset

Occurs when a message is delivered.

Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnMessageRead
getset

Occurs when a message is read.

Action<LCIMConversation, LCIMRecalledMessage> LeanCloud.Realtime.LCIMClient.OnMessageRecalled
getset

Occurs when a message is recalled.

Action<LCIMConversation, LCIMMessage> LeanCloud.Realtime.LCIMClient.OnMessageUpdated
getset

Occurs when a message is updated.

Action LeanCloud.Realtime.LCIMClient.OnPaused
getset

Occurs when the connection is lost.

Action LeanCloud.Realtime.LCIMClient.OnResume
getset

Occurs when the connection is recovered.

Action<LCIMConversation, string> LeanCloud.Realtime.LCIMClient.OnUnblocked
getset

Occurs when the current user is removed from the blacklist of a conversation.

Action<ReadOnlyCollection<LCIMConversation> > LeanCloud.Realtime.LCIMClient.OnUnreadMessagesCountUpdated
getset

Occurs when the number of unreadMessagesCount is updatded.

string LeanCloud.Realtime.LCIMClient.Tag
get

Client tag


The documentation for this class was generated from the following file: