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 AddMoney(decimal value) { var offerValue = this.Money + value; var validators = new List <IValidator> { ClubValidatorFactory.ClubMustHaveMoney(this.Club, offerValue) }; if (!ValidationHelper.ValidateProcess(validators)) { return; } this.Money += value; }