Şu metodumu içinde worker , run comleted gibi oluşumlar kullanmadan yeniden yazar msın tamamen optimize ve profesyenel asenkron olsun tüm DismApi kodları arayüzü dondurmayacak şekilde ayarlanasın ve DismApiProgressCallback değeri doğru çekilmeli  en son tam halde ver   ve en altta da progresscallback kullanımı öğreten kodu veriyorum  private async void MountUnmount_ClickAsync(object sender, RoutedEventArgs e, bool isMount)
{
    if (sourceDataGrid.SelectedItem is not null)
    {
        var selectedItem = (WimFile)sourceDataGrid.SelectedItem;
        string filename = selectedItem.Filename;

        // Dosyanın mevcut durumunu kontrol edin
        string currentStatus = await GetMountStatusAsync(filename, selectedItem.Index);

        // Eğer kullanıcı mount etmeye çalışıyorsa ve dosya zaten mount edilmişse
        if (isMount && currentStatus == "Mounted")
        {
            Wpf.Ui.Controls.MessageBox messageBox = new Wpf.Ui.Controls.MessageBox();
            messageBox.Title = "Warning";
            messageBox.Content = "It's already mounted.";
            await messageBox.ShowDialogAsync();
            return;
        }

        // Eğer kullanıcı unmount etmeye çalışıyorsa ve dosya zaten unmount edilmişse
        if (!isMount && currentStatus == "Not Mounted")
        {
            Wpf.Ui.Controls.MessageBox messageBox = new Wpf.Ui.Controls.MessageBox();
            messageBox.Title = "Warning";
            messageBox.Content = "It's already unmounted.";
            await messageBox.ShowDialogAsync();
            return;
        }

        string sevenZipExePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Tools", "7z.exe");
        string outputPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "7zOutput.txt");
        var startInfo = new ProcessStartInfo
        {
            FileName = sevenZipExePath,
            Arguments = $"l \"{filename}\"",
            UseShellExecute = false,
            RedirectStandardOutput = true,
            CreateNoWindow = true
        };

        using (var process = Process.Start(startInfo))
        {
            string processOutput = await process.StandardOutput.ReadToEndAsync();

            await process.WaitForExitAsync();

            if (processOutput.Contains("Method = LZMS"))
            {
                Wpf.Ui.Controls.MessageBox messageBox = new Wpf.Ui.Controls.MessageBox();
                messageBox.Title = "Warning";
                messageBox.Content = "This file cannot be mounted because it is compressed with the LZMS algorithm.";
                await messageBox.ShowDialogAsync();
                return;
            }
        }

        contextMenuControl.IsEnabled = false;
        contextMenuControl.Visibility = Visibility.Hidden;
        selectedItem.Status = "Starting..";
        sourceDataGrid.Items.Refresh();
        string mountPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Mount");

        InitializeDismApi();
        convert_btn.IsEnabled = false;
        add_btn.IsEnabled = false;
        var worker = new BackgroundWorker();
        worker.WorkerReportsProgress = true;
        worker.DoWork += async (s, args) =>
        {
            DismProgressCallback progressCallback = new DismProgressCallback((DismProgress progress) =>
            {
                worker.ReportProgress(isMount ? progress.Current : 100 - progress.Current);
            });

            selectedItem.IsMounting = true;
            if (isMount)
            {
                DismApi.MountImage(filename, mountPath, selectedItem.Index, false, DismMountImageOptions.None, progressCallback);
            }
            else
            {
                await Application.Current.Dispatcher.Invoke(async () =>
                {
                    Wpf.Ui.Controls.MessageBox messageBox = new Wpf.Ui.Controls.MessageBox();
                    messageBox.Title = "Warning";
                    messageBox.Content = "Should changes to the image be saved ?";
                    messageBox.IsPrimaryButtonEnabled = true;
                    messageBox.IsSecondaryButtonEnabled = true;
                    messageBox.PrimaryButtonText = "Yes";
                    messageBox.SecondaryButtonText = "No";
                    var result = await messageBox.ShowDialogAsync();
                    
                    if (result == Wpf.Ui.Controls.MessageBoxResult.Primary)
                    {
                        DismApi.UnmountImage(mountPath, true, progressCallback);  
                    }
                    else if (result == Wpf.Ui.Controls.MessageBoxResult.Secondary)
                    {
                        DismApi.UnmountImage(mountPath, false, progressCallback);
                    }
                });
            }
        };

        worker.ProgressChanged += (s, args) =>
        {
            this.Dispatcher.Invoke(() =>
            {
                selectedItem.Status = $"{(isMount ? "Mounting" : "Unmounting")}... {args.ProgressPercentage}%";
                selectedItem.Progress = args.ProgressPercentage;
                sourceDataGrid.Items.Refresh();
            });
        };
        worker.RunWorkerCompleted += async (s, args) =>
        {
            ShutdownDismApi();
            selectedItem.IsMounting = false;
            selectedItem.Status = await GetMountStatusAsync(selectedItem.Filename, selectedItem.Index);
            sourceDataGrid.Items.Refresh();
            contextMenuControl.Visibility = Visibility.Visible;
            contextMenuControl.IsEnabled = true;
            add_btn.IsEnabled = true;
            convert_btn.IsEnabled = true;
        };
        worker.RunWorkerAsync();
    }
}


private async void Mount_ClickAsync(object sender, RoutedEventArgs e) => MountUnmount_ClickAsync(sender, e, true);

private async void Unmount_ClickAsync(object sender, RoutedEventArgs e) => MountUnmount_ClickAsync(sender, e, false);                                             using System;

namespace Microsoft.Dism
{
    /// <summary>
    /// Represents a callback method to be called to report progress during time-consuming operations.
    /// </summary>
    /// <param name="progress">A <see cref="DismProgress" /> object containing information about the current progress.</param>
    public delegate void DismProgressCallback(DismProgress progress);

    public static partial class DismApi
    {
        /// <summary>
        /// A client-defined callback function that DISM API uses to report progress on time-consuming operations. API functions that report progress accept a pointer to a DismProgressCallback function. DISM_PROGRESS_CALLBACK is a typedef to this function type.
        /// </summary>
        /// <param name="current">The current progress value.</param>
        /// <param name="total">The total progress value.</param>
        /// <param name="userData">User defined custom data. This parameter can be passed to another DISM function that accepts a progress callback and that function will then pass it through to DismProgressCallback.</param>
        /// <remarks>
        /// <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/hh824734.aspx" />
        /// void DismProgressCallback(_In_ UINT Current, _In_ UINT Total, _In_ PVOID UserData)
        /// </remarks>
        internal delegate void DismProgressCallback(UInt32 current, UInt32 total, IntPtr userData);
    }
}