コード例 #1
0
ファイル: TestTypeService.cs プロジェクト: mjgasior/Numpuk2
        public List <string> GetOfType(Family[] families)
        {
            if (families.Length == 0)
            {
                return(TestTypes.GetAll());
            }

            if (families.Length > 4)
            {
                throw new ArgumentException("There cannot be more than 4 families to pick!");
            }

            var set = new List <string>();

            families.ToList().ForEach(x => set.AddRange(GetFamily(x)));

            return(set);
        }
コード例 #2
0
 public static bool IsValidName(string name)
 {
     return(TestTypes.GetAll().Any(x => name.Equals(x)));
 }