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

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

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

revision 445 by william, Sun Jun 2 19:21:16 2013 UTC revision 446 by william, Sun Jun 2 19:52:03 2013 UTC
# Line 26  namespace RomCheater.Serialization Line 26  namespace RomCheater.Serialization
26          public SerializationReader(Guid guid) : this(CreateFilename(guid)) { CreateReader(guid); }          public SerializationReader(Guid guid) : this(CreateFilename(guid)) { CreateReader(guid); }
27          protected SerializationReader(string filename) { FileName = filename; }          protected SerializationReader(string filename) { FileName = filename; }
28    
29                  
30            protected bool Cancelled { get; set; }
31    
32            public void CancelRequest() { Cancelled = true; }
33    
34          #region ISerializationResultCount members          #region ISerializationResultCount members
35          public int ResultCount { get; protected set; }          public int ResultCount { get; protected set; }
# Line 36  namespace RomCheater.Serialization Line 39  namespace RomCheater.Serialization
39          protected string FileName { get; private set; }          protected string FileName { get; private set; }
40          private void CreateReader(Guid guid)          private void CreateReader(Guid guid)
41          {          {
42                if (Cancelled) { return; }
43              fileStream = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.Read);              fileStream = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
44              binReader = new BinaryReader(fileStream);              binReader = new BinaryReader(fileStream);
45          }          }

Legend:
Removed from v.445  
changed lines
  Added in v.446

  ViewVC Help
Powered by ViewVC 1.1.22