public void PerformOperations() { ThrowIfDisposed(); try { _fileOperation.PerformOperations(); } catch (Exception) { // canceling operation cause exception :-/ } }
public void PerformOperations() { try { fileOperation.PerformOperations(); } catch (COMException) { } }
/// <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); }
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); } }
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); } }
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(); }