Ejemplo n.º 1
0
        public IEnumerable <Hour24Model> FillAllHours(IEnumerable <int> digits)
        {
            return(_generator.GenerateUniqueNumbers(digits)
                   .Select(n => {
                int firstDigit = n / 10;
                int secondDigit = n - firstDigit * 10;

                return new TimeNoModel {
                    first = firstDigit, second = secondDigit
                };
            })
                   .Where(h => ValidateHour(h))
                   .Select(gh => new Hour24Model {
                hour = gh
            })
                   .ToList());
        }