コード例 #1
0
        public async Task GetLatestCount(string random)
        {
            //var user = Context.User.Identity.Name;
            int count;

            do
            {
                count = countService.GetLatestCount();
                Thread.Sleep(1000);
                await Clients.All.SendAsync("ReceiveUpdate", count);
            }while (count < 10);
            await Clients.All.SendAsync("Finished");
        }
コード例 #2
0
        public async Task GetLatestCount(string random)
        {
            int count;

            do
            {
                count = _countService.GetLatestCount();
                Thread.Sleep(1000);

                await Clients.All.SendAsync("RecelveUpdate", count);
            } while (count < 10);
            await Clients.All.SendAsync("Finished");
        }