private static void WriteDeleteOutput(DeleteArgs args) { // try copy pe TryCopySource(args.SourcePath, args.OutputPath); // update pe var updateHandle = BeginUpdateResource(args.OutputPath); using (var updateDisposable = new PInvoke.DisposableHandle(updateHandle, h => PInvoke.DiscardUpdateResource(updateHandle))) { DeleteResource(updateHandle, args.ResourceType, args.ResourceName, args.OutputPath); CompleteUpdateResource(updateHandle, args.OutputPath); updateDisposable.SuppressDispose(); } }
private static void ValidateDeleteArgs(DeleteArgs args) { ValidateOperationArgs(args); }