public IReadOnlyList<IConfigurationSetting> LoadSettings() {
     var settings = new List<IConfigurationSetting>();
     var cp = new ConfigurationParser(_reader);
     while (true) {
         var s = cp.ReadSetting();
         if (s == null) {
             break;
         }
         settings.Add(s);
     }
     return settings;
 }
        public void LoadSingle(string content, string expectedName, string expectedValue, ConfigurationSettingValueType expectedValueType) {
            var settings = new List<IConfigurationSetting>();

            using (var sr = new StreamReader(ToStream(content))) {
                var cp = new ConfigurationParser(sr);
                while (true) {
                    var s = cp.ReadSetting();
                    if (s == null) {
                        break;
                    }
                    settings.Add(s);
                }
            }
            settings.Should().HaveCount(1);
            settings[0].Name.Should().Be(expectedName);
            settings[0].Value.Should().Be(expectedValue);
            settings[0].ValueType.Should().Be(expectedValueType);
        }
 private List<IConfigurationSetting> GetSettings(string content, out ConfigurationParser cp) {
     var settings = new List<IConfigurationSetting>();
     using (var sr = new StreamReader(ToStream(content))) {
         cp = new ConfigurationParser(sr);
         while (true) {
             var s = cp.ReadSetting();
             if (s == null) {
                 break;
             }
             settings.Add(s);
         }
     }
     return settings;
 }