static void UserLogin(IMClientEngine client, ulong userId, string token) { ClientValidateExecutor clientValidate = new ClientValidateExecutor(response => { client.GlobalMessageHead.Session = response.Output; }); clientValidate.UserId = userId; clientValidate.Token = token; client.Send(clientValidate); }
static void Group(IMClientEngine client, ulong fromUser, string toGroup, string textMessage) { GroupExecutor groupExecutor = new GroupExecutor(); groupExecutor.GroupMessage = new ImGroupMessage() { FromUserId = fromUser, ToGroup = toGroup, ContentType = "text", ContentBody = textMessage, }; client.Send(groupExecutor); }
static void User(IMClientEngine client, ulong fromUser, ulong toUser, string textMessage) { UserExecutor userExecutor = new UserExecutor(); userExecutor.UserMessage = new ImUserMessage() { FromUserId = fromUser, ToUserId = toUser, ContentType = "text", ContentBody = textMessage, }; client.Send(userExecutor); }