Пример #1
0
 public LockingStream(IRuntimeFileInfo fileInfo, Stream stream)
 {
     _stream = stream;
     _fileLock = FileLock.Lock(fileInfo);
 }
Пример #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_fileLock != null)
         {
             _fileLock.Dispose();
             _fileLock = null;
         }
         if (_stream != null)
         {
             _stream.Dispose();
             _stream = null;
         }
     }
     base.Dispose(disposing);
 }