/[RomCheater]/trunk/RomCheater/Serialization/SearchResultReader.cs
ViewVC logotype

Diff of /trunk/RomCheater/Serialization/SearchResultReader.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Serialization/SearchResultReader.cs	2013/06/06 03:33:46	558
+++ trunk/RomCheater/Serialization/SearchResultReader.cs	2013/06/06 03:38:00	559
@@ -154,7 +154,7 @@
     
 
     #region public class SearchResultReader : SerializationReader, ISearchResultReader, ISerializedResult
-    public class SearchResultReader : SerializationReader, ISearchResultReader, ISerializedResult<ulong>, IEnumerator<StructResultType<ulong>>//, IEnumerable<StructResultType<ulong>>
+    public class SearchResultReader : SerializationReader, ISearchResultReader, ISerializedResult<ulong>, IEnumerator<StructResultType<ulong>>, IEnumerable<StructResultType<ulong>>
     {
         //private Guid _ResultGuid;
         //private Guid ResultGuid { get { return _ResultGuid; } set { _ResultGuid = value; } }
@@ -169,7 +169,6 @@
         //[Obsolete("SearchResultReader(Guid guid, bool delete) should not be used")]
         //public SearchResultReader(Guid guid, bool delete) : base(guid, delete) { ResultGuid = guid; ReadHeader(); }
 
-        #region IEnumerator support
         private void CheckIndexLessThanMin()
         {
             if (_index < MinimumIndex)
@@ -186,6 +185,20 @@
         }
         private int _index = -1;
         private int index { get { return _index; } set { _index = value; } }
+
+        #region IEnumerable<StructResultType<ulong>> members
+        public IEnumerator<StructResultType<ulong>> GetEnumerator()
+        {
+            return this; // we are implementing our own custom enumerator through use of: IEnumerator<StructResultType<ulong>>
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return this.GetEnumerator();
+        }
+        #endregion
+
+        #region IEnumerator<StructResultType<ulong>> members
         public StructResultType<ulong> Current
         {
             get

 

  ViewVC Help
Powered by ViewVC 1.1.22