git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1102 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
bob
2007-07-05 11:38:48 +00:00
parent 6a188a1091
commit 866b45d3a7
5 changed files with 102 additions and 26 deletions

View File

@@ -63,7 +63,7 @@ namespace OpenRa.FileFormats
}
}
public class IniSection
public class IniSection : IEnumerable<KeyValuePair<string, string>>
{
string name;
Dictionary<string, string> values = new Dictionary<string, string>();
@@ -83,5 +83,15 @@ namespace OpenRa.FileFormats
string s;
return values.TryGetValue( key, out s ) ? s : defaultValue;
}
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
return values.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}