Example #1
0
        public Task NotifyPrize(PrizeNotification notification)
        {
            return(Task.WhenAll
                   (
                       Clients
                       .Group(notification.GameId)
                       .OnNotifyPrize(new
            {
                X = notification.X,
                Y = notification.Y,
                PrizeId = notification.PrizeId,
                Player = notification.UserName,
                Name = notification.Name,
                Points = notification.Points,
            }),

                       Clients
                       .User(notification.UserId)
                       .OnUserNotifyPrize(new
            {
                X = notification.X,
                Y = notification.Y,
                GameId = notification.GameId,
                GameName = notification.GameName,
                PrizeId = notification.PrizeId,
                Name = notification.Name,
                Description = notification.Description,
                Points = notification.Points,
            })
                   ));
        }
Example #2
0
 public Task NotifyPrize(PrizeNotification notification)
 {
     return(SafeInvoke(nameof(NotifyPrize), notification));
 }