public List<TestConfig> getTestConfigs() { List<TestConfig> rs = new List<TestConfig>(); foreach (var item in _xElement.Elements("TestConfig")) { TestConfig temp = new TestConfig(); temp.Name = item.Attribute("Name").Value; temp.Value = item.Attribute("Value").Value; temp.ID = item.Attribute("ID").Value; rs.Add(temp); } return rs; }
public Dictionary<string, string> getTestConfig() { Dictionary<string, string> list = new Dictionary<string, string>(); foreach (var item in _xElement.Elements("TestConfig")) { TestConfig temp = new TestConfig(); temp.Name = item.Attribute("Name").Value; temp.Value = item.Attribute("Value").Value; temp.ID = item.Attribute("ID").Value; list.Add(temp.Name, temp.Value); } return list; }