public static ValidatePlayerRanks ( List |
||
playerRanks | List |
|
리턴 | void |
protected override ValidationResult IsValid(object value, ValidationContext validationContext) { var playerRanks = (value as IEnumerable <IPlayerRank>).ToList(); try { PlayerRankValidator.ValidatePlayerRanks(playerRanks); return(ValidationResult.Success); }catch (ArgumentException argumentException) { return(new ValidationResult(argumentException.Message)); } }
protected override ValidationResult IsValid(object value, ValidationContext validationContext) { List <PlayerRank> playerRanks = value as List <PlayerRank>; try { PlayerRankValidator.ValidatePlayerRanks(playerRanks); return(ValidationResult.Success); }catch (ArgumentException argumentException) { return(new ValidationResult(argumentException.Message)); } }