Beispiel #1
0
        public static int ReadPlayListSectionCount()
        {
            var             config        = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            PlayListSection configSection = (PlayListSection)config.GetSection("PlayListSection");

            return(configSection.KeyValues.Count);
        }
Beispiel #2
0
        public static PlayListSection.TheKeyValue ReadPlayListSection(string key)
        {
            var             config        = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            PlayListSection configSection = (PlayListSection)config.GetSection("PlayListSection");
            var             value         = (from kv in configSection.KeyValues.Cast <PlayListSection.TheKeyValue>()
                                             where kv.Key == key
                                             select kv).FirstOrDefault();

            return(value);
        }