Skip to content

Commit 5022509

Browse files
committed
Implemented IEnumerable.
1 parent c0c8075 commit 5022509

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

ReClass.NET/Util/CustomDataMap.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections;
23
using System.Collections.Generic;
34
using System.Globalization;
45
using System.Xml.Linq;
@@ -10,7 +11,7 @@ namespace ReClassNET.Util
1011
/// The key to an item should consist of "a-zA-z0-9.,;_-+".
1112
/// The naming convention for keys is "PluginName.[Group.]Item".
1213
/// </summary>
13-
public class CustomDataMap
14+
public class CustomDataMap : IEnumerable<KeyValuePair<string, string>>
1415
{
1516
private readonly Dictionary<string, string> data = new Dictionary<string, string>();
1617

@@ -27,6 +28,16 @@ internal void Deserialize(XElement element)
2728
}
2829
}
2930

31+
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
32+
{
33+
return data.GetEnumerator();
34+
}
35+
36+
IEnumerator IEnumerable.GetEnumerator()
37+
{
38+
return GetEnumerator();
39+
}
40+
3041
/// <summary>
3142
/// Sets a configuration item.
3243
/// </summary>

0 commit comments

Comments
 (0)