public PeselMonthTranslator(PeselFactors peselFactors, ReturnTypeWhenStWrong returnTypeWhenStWrong, string peselLocalization) { _peselFactors = peselFactors; _returnTypeWhenStWrong = returnTypeWhenStWrong; _peselLocalization = peselLocalization; ChangePeselFactors(); }
public static void ValidateMonthLenghtByYear(PeselFactors peselFactors, string cellLocalization) { var monthConfig = new MonthsConfig(peselFactors.Year); if (peselFactors.Day > monthConfig[peselFactors.Month]) { throw new InvalidDaysNumberInMonth(peselFactors.Day, peselFactors.Month, cellLocalization); } }
public PeselSimpleValidations(PeselFactors peselFactors) { _peselFactors = new PeselMonthTranslator(peselFactors, Enums.ReturnTypeWhenStWrong.Enum).GetCorrectPeselFactors(); }
public PeselMonthTranslator(PeselFactors peselFactors, ReturnTypeWhenStWrong returnTypeWhenStWrong) { _peselFactors = peselFactors; _returnTypeWhenStWrong = returnTypeWhenStWrong; ChangePeselFactors(); }