ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Serialization/SerializationReader.cs
(Generate patch)

Comparing trunk/RomCheater/Serialization/SerializationReader.cs (file contents):
Revision 445 by william, Sun Jun 2 19:21:16 2013 UTC vs.
Revision 446 by william, Sun Jun 2 19:52:03 2013 UTC

# Line 26 | Line 26 | namespace RomCheater.Serialization
26          public SerializationReader(Guid guid) : this(CreateFilename(guid)) { CreateReader(guid); }
27          protected SerializationReader(string filename) { FileName = filename; }
28  
29 <              
29 >
30 >        protected bool Cancelled { get; set; }
31 >
32 >        public void CancelRequest() { Cancelled = true; }
33  
34          #region ISerializationResultCount members
35          public int ResultCount { get; protected set; }
# Line 36 | Line 39 | namespace RomCheater.Serialization
39          protected string FileName { get; private set; }
40          private void CreateReader(Guid guid)
41          {
42 +            if (Cancelled) { return; }
43              fileStream = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
44              binReader = new BinaryReader(fileStream);
45          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines