Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }