From cbcfcb82177bc2efb496e92054010f374b28082b Mon Sep 17 00:00:00 2001 From: Ionite Date: Thu, 6 Jul 2023 20:54:03 -0400 Subject: [PATCH] Move Models.Progress to Core assembly --- .../StabilityMatrix.Core}/Exceptions/ProcessException.cs | 4 +--- .../StabilityMatrix.Core}/Models/Progress/ProgressReport.cs | 4 +--- .../StabilityMatrix.Core}/Models/Progress/ProgressState.cs | 2 +- .../StabilityMatrix.Core}/Models/Progress/ProgressType.cs | 2 +- StabilityMatrix/DesignData/MockFirstLaunchSetupViewModel.cs | 2 +- StabilityMatrix/Helper/ArchiveHelper.cs | 2 +- StabilityMatrix/Helper/FileHash.cs | 2 +- StabilityMatrix/Helper/FileTransfers.cs | 2 +- StabilityMatrix/Helper/IPrerequisiteHelper.cs | 2 +- StabilityMatrix/Helper/PrerequisiteHelper.cs | 2 +- StabilityMatrix/Helper/ProcessRunner.cs | 2 +- StabilityMatrix/Models/CheckpointFile.cs | 2 +- StabilityMatrix/Models/CheckpointFolder.cs | 2 +- StabilityMatrix/Models/Packages/A3WebUI.cs | 2 +- StabilityMatrix/Models/Packages/BaseGitPackage.cs | 2 +- StabilityMatrix/Models/Packages/BasePackage.cs | 2 +- StabilityMatrix/Models/Packages/ComfyUI.cs | 2 +- StabilityMatrix/Models/Packages/VladAutomatic.cs | 2 +- StabilityMatrix/Services/DownloadService.cs | 2 +- StabilityMatrix/Services/IDownloadService.cs | 2 +- StabilityMatrix/StabilityMatrix.csproj | 4 ++++ StabilityMatrix/Updater/IUpdateHelper.cs | 2 +- StabilityMatrix/Updater/UpdateHelper.cs | 2 +- StabilityMatrix/ViewModels/CheckpointBrowserCardViewModel.cs | 2 +- StabilityMatrix/ViewModels/InstallerViewModel.cs | 2 +- StabilityMatrix/ViewModels/OneClickInstallViewModel.cs | 2 +- StabilityMatrix/ViewModels/PackageManagerViewModel.cs | 2 +- StabilityMatrix/ViewModels/RefreshBadgeViewModel.cs | 2 +- StabilityMatrix/ViewModels/SelectInstallLocationsViewModel.cs | 2 +- StabilityMatrix/ViewModels/SettingsViewModel.cs | 2 +- StabilityMatrix/ViewModels/UpdateWindowViewModel.cs | 2 +- 31 files changed, 34 insertions(+), 34 deletions(-) rename {StabilityMatrix => StabilityMatrix.Core/StabilityMatrix.Core}/Exceptions/ProcessException.cs (77%) rename {StabilityMatrix => StabilityMatrix.Core/StabilityMatrix.Core}/Models/Progress/ProgressReport.cs (97%) rename {StabilityMatrix => StabilityMatrix.Core/StabilityMatrix.Core}/Models/Progress/ProgressState.cs (61%) rename {StabilityMatrix => StabilityMatrix.Core/StabilityMatrix.Core}/Models/Progress/ProgressType.cs (57%) diff --git a/StabilityMatrix/Exceptions/ProcessException.cs b/StabilityMatrix.Core/StabilityMatrix.Core/Exceptions/ProcessException.cs similarity index 77% rename from StabilityMatrix/Exceptions/ProcessException.cs rename to StabilityMatrix.Core/StabilityMatrix.Core/Exceptions/ProcessException.cs index 8541192d..6d6435a2 100644 --- a/StabilityMatrix/Exceptions/ProcessException.cs +++ b/StabilityMatrix.Core/StabilityMatrix.Core/Exceptions/ProcessException.cs @@ -1,6 +1,4 @@ -using System; - -namespace StabilityMatrix.Exceptions; +namespace StabilityMatrix.Core.Exceptions; /// /// Exception that is thrown when a process fails. diff --git a/StabilityMatrix/Models/Progress/ProgressReport.cs b/StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressReport.cs similarity index 97% rename from StabilityMatrix/Models/Progress/ProgressReport.cs rename to StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressReport.cs index 736b94f6..22657d70 100644 --- a/StabilityMatrix/Models/Progress/ProgressReport.cs +++ b/StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressReport.cs @@ -1,6 +1,4 @@ -using System; - -namespace StabilityMatrix.Models.Progress; +namespace StabilityMatrix.Core.Models.Progress; public record struct ProgressReport { diff --git a/StabilityMatrix/Models/Progress/ProgressState.cs b/StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressState.cs similarity index 61% rename from StabilityMatrix/Models/Progress/ProgressState.cs rename to StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressState.cs index 799ce2eb..8a62751c 100644 --- a/StabilityMatrix/Models/Progress/ProgressState.cs +++ b/StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressState.cs @@ -1,4 +1,4 @@ -namespace StabilityMatrix.Models.Progress; +namespace StabilityMatrix.Core.Models.Progress; public enum ProgressState { diff --git a/StabilityMatrix/Models/Progress/ProgressType.cs b/StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressType.cs similarity index 57% rename from StabilityMatrix/Models/Progress/ProgressType.cs rename to StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressType.cs index 555e5799..5d92e975 100644 --- a/StabilityMatrix/Models/Progress/ProgressType.cs +++ b/StabilityMatrix.Core/StabilityMatrix.Core/Models/Progress/ProgressType.cs @@ -1,4 +1,4 @@ -namespace StabilityMatrix.Models.Progress; +namespace StabilityMatrix.Core.Models.Progress; public enum ProgressType { diff --git a/StabilityMatrix/DesignData/MockFirstLaunchSetupViewModel.cs b/StabilityMatrix/DesignData/MockFirstLaunchSetupViewModel.cs index b3829c7b..f82e334f 100644 --- a/StabilityMatrix/DesignData/MockFirstLaunchSetupViewModel.cs +++ b/StabilityMatrix/DesignData/MockFirstLaunchSetupViewModel.cs @@ -1,4 +1,4 @@ -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.ViewModels; namespace StabilityMatrix.DesignData; diff --git a/StabilityMatrix/Helper/ArchiveHelper.cs b/StabilityMatrix/Helper/ArchiveHelper.cs index 8c82d550..ff5aef68 100644 --- a/StabilityMatrix/Helper/ArchiveHelper.cs +++ b/StabilityMatrix/Helper/ArchiveHelper.cs @@ -9,7 +9,7 @@ using System.Windows.Threading; using NLog; using SharpCompress.Common; using SharpCompress.Readers; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Helper; diff --git a/StabilityMatrix/Helper/FileHash.cs b/StabilityMatrix/Helper/FileHash.cs index f59857c3..16e3b5f5 100644 --- a/StabilityMatrix/Helper/FileHash.cs +++ b/StabilityMatrix/Helper/FileHash.cs @@ -4,7 +4,7 @@ using System.IO; using System.Security.Cryptography; using System.Threading.Tasks; using Blake3; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Helper; diff --git a/StabilityMatrix/Helper/FileTransfers.cs b/StabilityMatrix/Helper/FileTransfers.cs index 1f63e93b..acd44fb4 100644 --- a/StabilityMatrix/Helper/FileTransfers.cs +++ b/StabilityMatrix/Helper/FileTransfers.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Helper; diff --git a/StabilityMatrix/Helper/IPrerequisiteHelper.cs b/StabilityMatrix/Helper/IPrerequisiteHelper.cs index 91cf5c4f..e868e9ce 100644 --- a/StabilityMatrix/Helper/IPrerequisiteHelper.cs +++ b/StabilityMatrix/Helper/IPrerequisiteHelper.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Helper; diff --git a/StabilityMatrix/Helper/PrerequisiteHelper.cs b/StabilityMatrix/Helper/PrerequisiteHelper.cs index 174224a4..909154d6 100644 --- a/StabilityMatrix/Helper/PrerequisiteHelper.cs +++ b/StabilityMatrix/Helper/PrerequisiteHelper.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Win32; using Octokit; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Python; using StabilityMatrix.Services; diff --git a/StabilityMatrix/Helper/ProcessRunner.cs b/StabilityMatrix/Helper/ProcessRunner.cs index b65092ee..9a5ca1f9 100644 --- a/StabilityMatrix/Helper/ProcessRunner.cs +++ b/StabilityMatrix/Helper/ProcessRunner.cs @@ -6,7 +6,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using NLog; -using StabilityMatrix.Exceptions; +using StabilityMatrix.Core.Exceptions; namespace StabilityMatrix.Helper; diff --git a/StabilityMatrix/Models/CheckpointFile.cs b/StabilityMatrix/Models/CheckpointFile.cs index 5bc14460..19c264cd 100644 --- a/StabilityMatrix/Models/CheckpointFile.cs +++ b/StabilityMatrix/Models/CheckpointFile.cs @@ -11,9 +11,9 @@ using AsyncAwaitBestPractices; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using NLog; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Extensions; using StabilityMatrix.Helper; -using StabilityMatrix.Models.Progress; namespace StabilityMatrix.Models; diff --git a/StabilityMatrix/Models/CheckpointFolder.cs b/StabilityMatrix/Models/CheckpointFolder.cs index b68f4bb3..08a6ce24 100644 --- a/StabilityMatrix/Models/CheckpointFolder.cs +++ b/StabilityMatrix/Models/CheckpointFolder.cs @@ -8,10 +8,10 @@ using System.Threading.Tasks; using System.Windows; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Extensions; using StabilityMatrix.Helper; using StabilityMatrix.Models.FileInterfaces; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Services; using StabilityMatrix.ViewModels; diff --git a/StabilityMatrix/Models/Packages/A3WebUI.cs b/StabilityMatrix/Models/Packages/A3WebUI.cs index 0e5b05b5..044d2b10 100644 --- a/StabilityMatrix/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix/Models/Packages/A3WebUI.cs @@ -6,9 +6,9 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; using StabilityMatrix.Helper.Cache; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Services; namespace StabilityMatrix.Models.Packages; diff --git a/StabilityMatrix/Models/Packages/BaseGitPackage.cs b/StabilityMatrix/Models/Packages/BaseGitPackage.cs index a64f9a56..47a8e13c 100644 --- a/StabilityMatrix/Models/Packages/BaseGitPackage.cs +++ b/StabilityMatrix/Models/Packages/BaseGitPackage.cs @@ -7,9 +7,9 @@ using System.Linq; using System.Threading.Tasks; using NLog; using Octokit; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; using StabilityMatrix.Helper.Cache; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Python; using StabilityMatrix.Services; diff --git a/StabilityMatrix/Models/Packages/BasePackage.cs b/StabilityMatrix/Models/Packages/BasePackage.cs index cedd5c87..e83f20fd 100644 --- a/StabilityMatrix/Models/Packages/BasePackage.cs +++ b/StabilityMatrix/Models/Packages/BasePackage.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Octokit; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Models.Packages; diff --git a/StabilityMatrix/Models/Packages/ComfyUI.cs b/StabilityMatrix/Models/Packages/ComfyUI.cs index 86dbc8ae..948de873 100644 --- a/StabilityMatrix/Models/Packages/ComfyUI.cs +++ b/StabilityMatrix/Models/Packages/ComfyUI.cs @@ -6,9 +6,9 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using NLog; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; using StabilityMatrix.Helper.Cache; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Services; namespace StabilityMatrix.Models.Packages; diff --git a/StabilityMatrix/Models/Packages/VladAutomatic.cs b/StabilityMatrix/Models/Packages/VladAutomatic.cs index 65401a98..376559ec 100644 --- a/StabilityMatrix/Models/Packages/VladAutomatic.cs +++ b/StabilityMatrix/Models/Packages/VladAutomatic.cs @@ -7,9 +7,9 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using NLog; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; using StabilityMatrix.Helper.Cache; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Python; using StabilityMatrix.Services; diff --git a/StabilityMatrix/Services/DownloadService.cs b/StabilityMatrix/Services/DownloadService.cs index d69ee498..669966e5 100644 --- a/StabilityMatrix/Services/DownloadService.cs +++ b/StabilityMatrix/Services/DownloadService.cs @@ -5,7 +5,7 @@ using System.Net.Http.Headers; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Polly.Contrib.WaitAndRetry; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Services; diff --git a/StabilityMatrix/Services/IDownloadService.cs b/StabilityMatrix/Services/IDownloadService.cs index 03610107..2f1f3e46 100644 --- a/StabilityMatrix/Services/IDownloadService.cs +++ b/StabilityMatrix/Services/IDownloadService.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Services; diff --git a/StabilityMatrix/StabilityMatrix.csproj b/StabilityMatrix/StabilityMatrix.csproj index 993d0fbe..4f1b82ab 100644 --- a/StabilityMatrix/StabilityMatrix.csproj +++ b/StabilityMatrix/StabilityMatrix.csproj @@ -105,5 +105,9 @@ + + + + diff --git a/StabilityMatrix/Updater/IUpdateHelper.cs b/StabilityMatrix/Updater/IUpdateHelper.cs index 4987a2f0..240149ee 100644 --- a/StabilityMatrix/Updater/IUpdateHelper.cs +++ b/StabilityMatrix/Updater/IUpdateHelper.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; namespace StabilityMatrix.Updater; diff --git a/StabilityMatrix/Updater/UpdateHelper.cs b/StabilityMatrix/Updater/UpdateHelper.cs index 51c01c6a..07995f42 100644 --- a/StabilityMatrix/Updater/UpdateHelper.cs +++ b/StabilityMatrix/Updater/UpdateHelper.cs @@ -7,10 +7,10 @@ using System.Threading.Tasks; using System.Windows.Threading; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Extensions; using StabilityMatrix.Helper; using StabilityMatrix.Models.Configs; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Services; namespace StabilityMatrix.Updater; diff --git a/StabilityMatrix/ViewModels/CheckpointBrowserCardViewModel.cs b/StabilityMatrix/ViewModels/CheckpointBrowserCardViewModel.cs index 5a5768aa..ea0ad18f 100644 --- a/StabilityMatrix/ViewModels/CheckpointBrowserCardViewModel.cs +++ b/StabilityMatrix/ViewModels/CheckpointBrowserCardViewModel.cs @@ -10,12 +10,12 @@ using AsyncAwaitBestPractices; using CommunityToolkit.Mvvm.Input; using NLog; using Refit; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Extensions; using StabilityMatrix.Helper; using StabilityMatrix.Models; using StabilityMatrix.Models.Api; using StabilityMatrix.Models.FileInterfaces; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Services; using Wpf.Ui.Controls; diff --git a/StabilityMatrix/ViewModels/InstallerViewModel.cs b/StabilityMatrix/ViewModels/InstallerViewModel.cs index fe14b650..93b76a57 100644 --- a/StabilityMatrix/ViewModels/InstallerViewModel.cs +++ b/StabilityMatrix/ViewModels/InstallerViewModel.cs @@ -11,10 +11,10 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Microsoft.Extensions.Logging; using Octokit; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; using StabilityMatrix.Models; using StabilityMatrix.Models.Packages; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Python; using StabilityMatrix.Services; using Wpf.Ui.Contracts; diff --git a/StabilityMatrix/ViewModels/OneClickInstallViewModel.cs b/StabilityMatrix/ViewModels/OneClickInstallViewModel.cs index 41bdfad2..307a3a53 100644 --- a/StabilityMatrix/ViewModels/OneClickInstallViewModel.cs +++ b/StabilityMatrix/ViewModels/OneClickInstallViewModel.cs @@ -4,10 +4,10 @@ using System.Windows; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Microsoft.Extensions.Logging; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; using StabilityMatrix.Models; using StabilityMatrix.Models.Packages; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Python; using EventManager = StabilityMatrix.Helper.EventManager; diff --git a/StabilityMatrix/ViewModels/PackageManagerViewModel.cs b/StabilityMatrix/ViewModels/PackageManagerViewModel.cs index 00e73544..cd47b0b3 100644 --- a/StabilityMatrix/ViewModels/PackageManagerViewModel.cs +++ b/StabilityMatrix/ViewModels/PackageManagerViewModel.cs @@ -11,7 +11,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Microsoft.Extensions.Logging; using Polly; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; using Wpf.Ui.Contracts; using Wpf.Ui.Controls; using Wpf.Ui.Controls.ContentDialogControl; diff --git a/StabilityMatrix/ViewModels/RefreshBadgeViewModel.cs b/StabilityMatrix/ViewModels/RefreshBadgeViewModel.cs index b282930a..b6a7b37a 100644 --- a/StabilityMatrix/ViewModels/RefreshBadgeViewModel.cs +++ b/StabilityMatrix/ViewModels/RefreshBadgeViewModel.cs @@ -5,7 +5,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using NLog; using StabilityMatrix.Controls; -using StabilityMatrix.Models.Progress; +using StabilityMatrix.Core.Models.Progress; using Wpf.Ui.Common; using Wpf.Ui.Controls; using Wpf.Ui.Controls.IconElements; diff --git a/StabilityMatrix/ViewModels/SelectInstallLocationsViewModel.cs b/StabilityMatrix/ViewModels/SelectInstallLocationsViewModel.cs index d960a637..2c07fd3b 100644 --- a/StabilityMatrix/ViewModels/SelectInstallLocationsViewModel.cs +++ b/StabilityMatrix/ViewModels/SelectInstallLocationsViewModel.cs @@ -9,8 +9,8 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using NLog; using Ookii.Dialogs.Wpf; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Models.Settings; namespace StabilityMatrix.ViewModels; diff --git a/StabilityMatrix/ViewModels/SettingsViewModel.cs b/StabilityMatrix/ViewModels/SettingsViewModel.cs index 421c682a..b3e7af88 100644 --- a/StabilityMatrix/ViewModels/SettingsViewModel.cs +++ b/StabilityMatrix/ViewModels/SettingsViewModel.cs @@ -20,10 +20,10 @@ using Ookii.Dialogs.Wpf; using Polly.Timeout; using Refit; using StabilityMatrix.Api; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Database; using StabilityMatrix.Helper; using StabilityMatrix.Models; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Python; using Wpf.Ui.Appearance; using Wpf.Ui.Contracts; diff --git a/StabilityMatrix/ViewModels/UpdateWindowViewModel.cs b/StabilityMatrix/ViewModels/UpdateWindowViewModel.cs index ab2b5cd2..266559f4 100644 --- a/StabilityMatrix/ViewModels/UpdateWindowViewModel.cs +++ b/StabilityMatrix/ViewModels/UpdateWindowViewModel.cs @@ -5,8 +5,8 @@ using System.Threading.Tasks; using System.Windows; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; +using StabilityMatrix.Core.Models.Progress; using StabilityMatrix.Helper; -using StabilityMatrix.Models.Progress; using StabilityMatrix.Updater; using Wpf.Ui.Controls.Window;