Ejemplo n.º 1
0
        public async void SendMessage(string user)
        {
            Users[user] = Context.ConnectionId;
            string account = commonAppService.GetUserAccount(int.Parse(user));

            if (approvalAppService.GetInform(account).Count != 0)
            {
                await hubContext.Clients.Client(Context.ConnectionId).SendAsync("ReceiveMessage", "您有新的消息");
            }
        }