Esempio n. 1
0
        public List <T> GetEnums <T>(string section, string item, bool mandatory, char separator, params string[] path) where T : struct, IConvertible
        {
            var stringList = GetStrings(section, item, mandatory, separator, path);

            if (stringList != null)
            {
                return(stringList.Select(s => RFEnumHelpers.GetEnum <T>(s, mandatory)).ToList());
            }
            return(new List <T>());
        }
Esempio n. 2
0
        public T GetEnum <T>(string section, string item, bool mandatory, params string[] path) where T : struct, IConvertible
        {
            var stringValue = GetString(section, item, mandatory, path);

            if (stringValue.NotBlank())
            {
                return(RFEnumHelpers.GetEnum <T>(stringValue, mandatory));
            }
            return(default(T));
        }