public void PerformOperations()
 {
     ThrowIfDisposed();
     try { _fileOperation.PerformOperations(); }
     catch (Exception) {
         // canceling operation cause exception :-/
     }
 }
Esempio n. 2
0
 public void PerformOperations()
 {
     try
     {
         fileOperation.PerformOperations();
     }
     catch (COMException) { }
 }
Esempio n. 3
0
 /// <summary>
 /// Start the file copy operation and release all resources.
 /// </summary>
 public void Dispose()
 {
     try {
         _fileOperation.PerformOperations();
     } catch { }              // if something goes wrong the IFileOperation UI will tell the user so we don't have to
     Marshal.FinalReleaseComObject(_fileOperation);
     GC.SuppressFinalize(this);
 }
Esempio n. 4
0
 public void PerformOperations()
 {
     ThrowIfDisposed();
     try
     {
         _fileOperation.PerformOperations();
     }
     catch
     {
     }
 }
        public void PerformOperations()
        {
            if (disposed)
            {
                throw new ObjectDisposedException(nameof(FileOperation));
            }

            HResult hr = fileOperation.PerformOperations();

            if (!CoreErrorHelper.Succeeded(hr))
            {
                Marshal.ThrowExceptionForHR((int)hr);
            }
        }
Esempio n. 6
0
        private ResourceHandle FinishOperation(IFileOperation operation, FileOperationProgressSink sink)
        {
            operation.PerformOperations();
            //await sink.WhenCompleted();
            var item = sink.CreatedItems.LastOrDefault();

            if (item != null)
            {
                return(new ShellFileHandle(item, this));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 7
0
 public static void End(bool doTransaction = true)
 {
     if (_fileOperation != null)
     {
         if (doTransaction)
         {
             try
             {
                 _fileOperation.PerformOperations();
             }
             catch (Exception ex)
             {
                 if (!ex.HResult.Equals(unchecked (( int )0x8000FFFF)))
                 {
                     throw;
                 }
             }
         }
         Marshal.ReleaseComObject(_fileOperation);
         _fileOperation = null;
     }
 }
 public void PerformOperations()
 {
     ThrowIfDisposed();
     _fileOperation.PerformOperations();
 }