Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }