Пример #1
0
 public bool RestoreFromBackup()
 {
     if (_tempFile == null)
     {
         return(false);
     }
     _sourceFile.Delete();
     _tempFile.MoveTo(_sourceFile.FullName);
     return(true);
 }
Пример #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _tempFile.Delete();
                _tempFile   = null;
                _sourceFile = null;
            }

            _disposed = true;
        }