예제 #1
0
        public Task NotifyAward(AwardNotification notification)
        {
            return(Task.WhenAll
                   (
                       Clients.All
                       .OnNotifyAward(new
            {
                AwardId = notification.AwardId,
                Level = notification.Level,
                Name = notification.Name,
                Points = notification.Points,
                Player = notification.UserName
            }),

                       Clients.User(notification.UserId)
                       .OnUserNotifyAward(new
            {
                AwardId = notification.AwardId,
                Level = notification.Level,
                Name = notification.Name,
                Points = notification.Points,
                Player = notification.UserName
            })
                   ));
        }
예제 #2
0
 public Task NotifyAward(AwardNotification notification)
 {
     return(SafeInvoke(nameof(NotifyAward), notification));
 }