ArmedCards.BusinessLogic.AppServices.Hubs.SendMessage.SendWinnerSelected C# (CSharp) Method

SendWinnerSelected() public method

Update the game view when the commander has selected the winner of the round
public SendWinnerSelected ( Entities game, Entities round, System.Boolean sendToSpectators ) : void
game Entities The game to update
round Entities The game's current round
sendToSpectators System.Boolean Should this update go to spectators
return void
        public void SendWinnerSelected(Entities.Game game, Entities.GameRound round, Boolean sendToSpectators)
        {
            Entities.Filters.ActiveConnection.SelectAll filter = new Entities.Filters.ActiveConnection.SelectAll();
            filter.GroupName = String.Format("Game_{0}", game.GameID);

            List<Entities.ActiveConnection> connections = _selectActiveConnection.Execute(filter);

            SendWinnerSelected(game, round, connections.Where(x => x.ConnectionType == Entities.Enums.ConnectionType.GamePlayer), game.Players);

            if(sendToSpectators)
            {
                SendWinnerSelected(game, round, connections.Where(x => x.ConnectionType == Entities.Enums.ConnectionType.GameSpectator), game.Spectators);
            }
        }

Same methods

SendMessage::SendWinnerSelected ( Entities game, Entities round, IEnumerable connections, List users ) : void