Esempio n. 1
0
        private static T parse <T, K>(K value, string description, Func <T, bool> predicate) where T : Enumerador <Tkey, Tvalue>, new()
        {
            var matchingItem = Enumerador <Tkey, Tvalue> .GetAll <T>().FirstOrDefault(predicate);

            if (matchingItem == null)
            {
                var message = string.Format("'{0}' is not a valid {1} in {2}", value, description, typeof(T));
                throw new ApplicationException(message);
            }

            return(matchingItem);
        }
Esempio n. 2
0
 public static IEnumerable <Restricciones> Lista()
 {
     return(Enumerador.GetAll <Restricciones>());
 }
Esempio n. 3
0
 public static IEnumerable <TiposBaseXsd> Lista()
 {
     return(Enumerador.GetAll <TiposBaseXsd>());
 }