예제 #1
0
        public MatchCreateResourceValidator(ILifeLikeRepo lifeLikeRepo)
        {
            this._lifeLikeRepo = lifeLikeRepo;

            RuleFor(mc => mc.NrPlayers).InclusiveBetween(1, 4);
            RuleFor(mc => mc.RuleSet).Must(BeAValidRuleSet);
            RuleFor(mc => mc.MaxIters).InclusiveBetween(1, 10000);
            RuleFor(mc => mc.Rows).InclusiveBetween(2, 50);
            RuleFor(mc => mc.Cols).InclusiveBetween(2, 50);
        }
예제 #2
0
 public RuleSetService(ILifeLikeRepo lifeLikeRepo)
 {
     this._lifeLikeRepo = lifeLikeRepo;
 }