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

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

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

revision 491 by william, Mon Jun 3 21:32:55 2013 UTC revision 577 by william, Thu Jun 6 07:56:04 2013 UTC
# Line 27  namespace RomCheater.Serialization Line 27  namespace RomCheater.Serialization
27      public class SearchResultWriter : SerializationWriter, ISearchResultWriter      public class SearchResultWriter : SerializationWriter, ISearchResultWriter
28      {      {
29    
30          private int ResultsWritten = 0;          private ulong ResultsWritten = 0;
31          protected override string TemporaryFolder { get { return SearchResultsConstants.SearchResultsFolder; } }          protected override string TemporaryFolder { get { return SearchResultsConstants.SearchResultsFolder; } }
32          //public SearchResultWriter() : base() { }          //public SearchResultWriter() : base() { }
33          public SearchResultWriter(int resultCount, Guid guid) : this(resultCount, guid,false) {  }          public SearchResultWriter(Guid guid) : this(0, guid) { }
34          public SearchResultWriter(int resultCount, Guid guid, bool delete) : base(resultCount, guid,delete) { WriteHeader(guid); }          public SearchResultWriter(Guid guid, bool delete) : this(0, guid, delete) { }
35            public SearchResultWriter(ulong resultCount, Guid guid) : this(resultCount, guid, false) { }
36            public SearchResultWriter(ulong resultCount, Guid guid, bool delete) : base(resultCount, guid, delete) { WriteHeader(guid); }
37          //public SearchResultWriter(string filename, Guid guid) : base(CreateFileName(filename,guid), guid) { WriteHeader(guid); }          //public SearchResultWriter(string filename, Guid guid) : base(CreateFileName(filename,guid), guid) { WriteHeader(guid); }
38          //public SearchResultWriter(string filename, int resultCount, Guid guid) : base(filename, resultCount, guid, false) { WriteHeader(guid); }          //public SearchResultWriter(string filename, int resultCount, Guid guid) : base(filename, resultCount, guid, false) { WriteHeader(guid); }
39          //public SearchResultWriter(string filename, int resultCount, Guid guid, bool delete) : base(filename, resultCount, guid, delete) { WriteHeader(guid); }                //public SearchResultWriter(string filename, int resultCount, Guid guid, bool delete) : base(filename, resultCount, guid, delete) { WriteHeader(guid); }      
40          #region ISearchResultWriter members          #region ISearchResultWriter members
41          public void WriteResult<TValue>(uint address, TValue value) where TValue : IConvertible          public void WriteResult<TValue>(ulong address, TValue value) where TValue : IConvertible
42          {          {
43              try              try
44              {              {
# Line 101  namespace RomCheater.Serialization Line 103  namespace RomCheater.Serialization
103                  }                  }
104                  // write count (int)                  // write count (int)
105                  binWriter.Write(ResultCount);                  binWriter.Write(ResultCount);
106                  ResultCountOffset = binWriter.BaseStream.Position - sizeof(int);                  ResultCountOffset = binWriter.BaseStream.Position - sizeof(ulong);
107              }              }
108              catch (Exception ex)              catch (Exception ex)
109              {              {
# Line 136  namespace RomCheater.Serialization Line 138  namespace RomCheater.Serialization
138              }              }
139          }          }
140      }      }
141  }  }

Legend:
Removed from v.491  
changed lines
  Added in v.577

  ViewVC Help
Powered by ViewVC 1.1.22