public void AddPlayer(PlayerTradable player) { var validators = new List <IValidator> { TradeOfferValidatorFactory.OfferCannotHavePlayer(this, player), ClubValidatorFactory.ClubMustHavePlayer(this.Club, player) }; if (!ValidationHelper.ValidateProcess(validators)) { return; } this.Players.Add(player); }
public void AddPlayer(PlayerTradable player) { this.Players.Add(player); }
public void RemovePlayer(PlayerTradable player) { this.Players.Remove(this.Players.FirstOrDefault(x => x.Id == player.Id)); }
public bool HasPlayer(PlayerTradable player) { return(this.Players.Any(x => x.Id == player.Id)); }