예제 #1
0
        public async Task ServerAddScore(decimal score)
        {
            var hubResponse = HubResponse.Failure;

            try
            {
                await _service.Add(new StdScoreDTO
                {
                    Score = score
                });

                hubResponse = HubResponse.Success;
            }
            catch (Exception ex)
            {
                //log
            }

            await Clients.All.SendAsync("ClientAddScore", (int)hubResponse);
        }