diff --git a/.editorconfig b/.editorconfig index 35c6cf4..f0f6635 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 25-09-2023 +# Version: 1.0.1 +# Updated: 03-06-2024 # Location: Root # Distribution: DotNet8 # Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options @@ -464,10 +464,45 @@ dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net dotnet_diagnostic.CA1014.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1014.md dotnet_diagnostic.CA1068.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md dotnet_diagnostic.CA1305.severity = error +dotnet_diagnostic.CA1510.severity = suggestion # Use ArgumentNullException throw helper +dotnet_diagnostic.CA1511.severity = suggestion # Use ArgumentException throw helper +dotnet_diagnostic.CA1512.severity = suggestion # Use ArgumentOutOfRangeException throw helper +dotnet_diagnostic.CA1513.severity = suggestion # Use ObjectDisposedException throw helper +dotnet_diagnostic.CA1514.severity = error # Avoid redundant length argument dotnet_diagnostic.CA1707.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md dotnet_diagnostic.CA1812.severity = none dotnet_diagnostic.CA1822.severity = suggestion +dotnet_diagnostic.CA1849.severity = error # Call async methods when in an async method +dotnet_diagnostic.CA1854.severity = suggestion # Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method +dotnet_diagnostic.CA1855.severity = suggestion # Prefer 'Clear' over 'Fill' +dotnet_diagnostic.CA1856.severity = error # Incorrect usage of ConstantExpected attribute +dotnet_diagnostic.CA1857.severity = suggestion # A constant is expected for the parameter +dotnet_diagnostic.CA1858.severity = suggestion # Use 'StartsWith' instead of 'IndexOf' +dotnet_diagnostic.CA1859.severity = suggestion # Use concrete types when possible for improved performance +dotnet_diagnostic.CA1860.severity = suggestion # Avoid using 'Enumerable.Any()' extension method +dotnet_diagnostic.CA1861.severity = suggestion # Avoid constant arrays as arguments +dotnet_diagnostic.CA1862.severity = error # Use the 'StringComparison' method overloads to perform case-insensitive string comparisons +dotnet_diagnostic.CA1863.severity = suggestion # Use 'CompositeFormat' +dotnet_diagnostic.CA1864.severity = suggestion # Prefer the 'IDictionary.TryAdd(TKey, TValue)' method +dotnet_diagnostic.CA1865.severity = suggestion # Use char overload +dotnet_diagnostic.CA1866.severity = suggestion # Use char overload +dotnet_diagnostic.CA1867.severity = suggestion # Use char overload +dotnet_diagnostic.CA1868.severity = suggestion # Unnecessary call to 'Contains(item)' +dotnet_diagnostic.CA1869.severity = suggestion # Cache and reuse 'JsonSerializerOptions' instances +dotnet_diagnostic.CA1870.severity = suggestion # Use a cached 'SearchValues' instance dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md +dotnet_diagnostic.CA2017.severity = error # Parameter count mismatch +dotnet_diagnostic.CA2018.severity = error # The count argument to Buffer.BlockCopy should specify the number of bytes to copy +dotnet_diagnostic.CA2019.severity = error # ThreadStatic fields should not use inline initialization +dotnet_diagnostic.CA2021.severity = error # Don't call Enumerable.Cast or Enumerable.OfType with incompatible types +dotnet_diagnostic.CA2250.severity = suggestion # Use ThrowIfCancellationRequested +dotnet_diagnostic.CA2252.severity = suggestion # Opt-in to preview features should be used with caution +dotnet_diagnostic.CA2253.severity = error # Named placeholders should not be numeric values +dotnet_diagnostic.CA2254.severity = suggestion # Template should be a static expression +dotnet_diagnostic.CA2255.severity = suggestion # The ModuleInitializer attribute should not be used in libraries +dotnet_diagnostic.CA2259.severity = error # Ensure ThreadStatic is only used with static fields +dotnet_diagnostic.CA2260.severity = error # Implement generic math interfaces correctly +dotnet_diagnostic.CA2261.severity = error # Do not use ConfigureAwaitOptions.SuppressThrowing with Task dotnet_diagnostic.IDE0005.severity = warning # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0005.md dotnet_diagnostic.IDE0058.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md diff --git a/Directory.Build.props b/Directory.Build.props index 1b5dc3e..316b676 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -41,10 +41,10 @@ - + - + \ No newline at end of file diff --git a/sample-projects/HelloWorld/Code/HelloWorldBlazor/.editorconfig b/sample-projects/HelloWorld/Code/HelloWorldBlazor/.editorconfig index c96bba9..15e1bd6 100644 --- a/sample-projects/HelloWorld/Code/HelloWorldBlazor/.editorconfig +++ b/sample-projects/HelloWorld/Code/HelloWorldBlazor/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 03-06-2024 # Location: blazor # Distribution: Frameworks @@ -11,6 +11,7 @@ dotnet_diagnostic.MA0048.severity = none # To support code-behind [component].razor.cs files / Inherit from ComponentBase - File will not match type name. + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/sample-projects/HelloWorld/Code/HelloWorldWpf/.editorconfig b/sample-projects/HelloWorld/Code/HelloWorldWpf/.editorconfig index 821094e..93ca832 100644 --- a/sample-projects/HelloWorld/Code/HelloWorldWpf/.editorconfig +++ b/sample-projects/HelloWorld/Code/HelloWorldWpf/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,9 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/sample/.editorconfig b/sample/.editorconfig index 62ffd2f..c44e9af 100644 --- a/sample/.editorconfig +++ b/sample/.editorconfig @@ -41,6 +41,11 @@ # StyleCop # https://github.com/DotNetAnalyzers/StyleCopAnalyzers +# SonarAnalyzer.CSharp +# https://rules.sonarsource.com/csharp + +dotnet_diagnostic.S1075.severity = none # Refactor your code not to use hardcoded absolute paths or URIs + ########################################## # Custom - Code Analyzers Rules diff --git a/src/Atc.Installer.Integration.Azure/Atc.Installer.Integration.Azure.csproj b/src/Atc.Installer.Integration.Azure/Atc.Installer.Integration.Azure.csproj index 08f34ec..92b3b19 100644 --- a/src/Atc.Installer.Integration.Azure/Atc.Installer.Integration.Azure.csproj +++ b/src/Atc.Installer.Integration.Azure/Atc.Installer.Integration.Azure.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/src/Atc.Installer.Integration.Azure/AzureStorageAccountInstallerService.cs b/src/Atc.Installer.Integration.Azure/AzureStorageAccountInstallerService.cs index 2e8db85..13093e5 100644 --- a/src/Atc.Installer.Integration.Azure/AzureStorageAccountInstallerService.cs +++ b/src/Atc.Installer.Integration.Azure/AzureStorageAccountInstallerService.cs @@ -15,32 +15,25 @@ public async Task> DownloadLatestFilesByNames( ArgumentException.ThrowIfNullOrEmpty(downloadFolder); ArgumentNullException.ThrowIfNull(components); - try - { - var blobServiceClient = new BlobServiceClient(storageConnectionString); - var blobContainerClient = blobServiceClient.GetBlobContainerClient(blobContainerName); - var blobContainerExist = await blobContainerClient - .ExistsAsync() - .ConfigureAwait(true); + var blobServiceClient = new BlobServiceClient(storageConnectionString); + var blobContainerClient = blobServiceClient.GetBlobContainerClient(blobContainerName); + var blobContainerExist = await blobContainerClient + .ExistsAsync() + .ConfigureAwait(true); - if (!blobContainerExist) - { - return new List(); - } - - var blobsToDownload = GetBlobsToDownload(blobContainerClient, components); - return blobsToDownload.Count > 0 - ? await HandleFileDownloads( - downloadFolder, - blobsToDownload, - blobContainerClient) - .ConfigureAwait(true) - : new List(); - } - catch + if (!blobContainerExist) { return new List(); } + + var blobsToDownload = GetBlobsToDownload(blobContainerClient, components); + return blobsToDownload.Count > 0 + ? await HandleFileDownloads( + downloadFolder, + blobsToDownload, + blobContainerClient) + .ConfigureAwait(true) + : new List(); } private static List GetBlobsToDownload( diff --git a/src/Atc.Installer.Integration.WindowsApplication/Atc.Installer.Integration.WindowsApplication.csproj b/src/Atc.Installer.Integration.WindowsApplication/Atc.Installer.Integration.WindowsApplication.csproj index 2f4132c..924d49b 100644 --- a/src/Atc.Installer.Integration.WindowsApplication/Atc.Installer.Integration.WindowsApplication.csproj +++ b/src/Atc.Installer.Integration.WindowsApplication/Atc.Installer.Integration.WindowsApplication.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Atc.Installer.Integration/Atc.Installer.Integration.csproj b/src/Atc.Installer.Integration/Atc.Installer.Integration.csproj index 0ba6890..2de6d86 100644 --- a/src/Atc.Installer.Integration/Atc.Installer.Integration.csproj +++ b/src/Atc.Installer.Integration/Atc.Installer.Integration.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/Atc.Installer.Wpf.App/.editorconfig b/src/Atc.Installer.Wpf.App/.editorconfig index af997f3..4ab7e6a 100644 --- a/src/Atc.Installer.Wpf.App/.editorconfig +++ b/src/Atc.Installer.Wpf.App/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,8 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + ########################################## # Custom - Code Analyzers Rules diff --git a/src/Atc.Installer.Wpf.App/AssemblyInfo.cs b/src/Atc.Installer.Wpf.App/AssemblyInfo.cs index 39c19bf..28a92fb 100644 --- a/src/Atc.Installer.Wpf.App/AssemblyInfo.cs +++ b/src/Atc.Installer.Wpf.App/AssemblyInfo.cs @@ -5,9 +5,9 @@ [assembly: AssemblyCompany("atc-net")] [assembly: AssemblyProduct("Atc.Installer")] [assembly: AssemblyTitle("Atc.Installer")] -[assembly: AssemblyVersion("1.0.24.0")] -[assembly: AssemblyInformationalVersion("1.0.24.0")] -[assembly: AssemblyFileVersion("1.0.24.0")] +[assembly: AssemblyVersion(Atc.Installer.Wpf.App.AssemblyVersionInfo.Version)] +[assembly: AssemblyInformationalVersion(Atc.Installer.Wpf.App.AssemblyVersionInfo.Version)] +[assembly: AssemblyFileVersion(Atc.Installer.Wpf.App.AssemblyVersionInfo.Version)] [assembly: System.Resources.NeutralResourcesLanguage("en")] [assembly: System.Runtime.Versioning.TargetPlatform("Windows8.0")] [assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows8.0")] \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.App/AssemblyVersionInfo.cs b/src/Atc.Installer.Wpf.App/AssemblyVersionInfo.cs new file mode 100644 index 0000000..0b5b599 --- /dev/null +++ b/src/Atc.Installer.Wpf.App/AssemblyVersionInfo.cs @@ -0,0 +1,6 @@ +namespace Atc.Installer.Wpf.App; + +internal static class AssemblyVersionInfo +{ + public const string Version = "1.0.25.0"; +} \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.App/Atc.Installer.Wpf.App.csproj b/src/Atc.Installer.Wpf.App/Atc.Installer.Wpf.App.csproj index caf4ea0..e32d91b 100644 --- a/src/Atc.Installer.Wpf.App/Atc.Installer.Wpf.App.csproj +++ b/src/Atc.Installer.Wpf.App/Atc.Installer.Wpf.App.csproj @@ -45,7 +45,7 @@ - + @@ -53,7 +53,7 @@ - + diff --git a/src/Atc.Installer.Wpf.App/MainWindow.xaml.cs b/src/Atc.Installer.Wpf.App/MainWindow.xaml.cs index 350c5fc..d8cc992 100644 --- a/src/Atc.Installer.Wpf.App/MainWindow.xaml.cs +++ b/src/Atc.Installer.Wpf.App/MainWindow.xaml.cs @@ -23,12 +23,6 @@ private void OnLoaded( { var vm = DataContext as IMainWindowViewModel; vm!.OnLoaded(this, e); - - if (MainWindowControl.Width >= SystemParameters.PrimaryScreenWidth || - MainWindowControl.Height >= SystemParameters.PrimaryScreenHeight) - { - vm.WindowState = WindowState.Maximized; - } } private void OnClosing( diff --git a/src/Atc.Installer.Wpf.App/MainWindowViewModel_Commands.cs b/src/Atc.Installer.Wpf.App/MainWindowViewModel_Commands.cs index dbd8524..ccd49e1 100644 --- a/src/Atc.Installer.Wpf.App/MainWindowViewModel_Commands.cs +++ b/src/Atc.Installer.Wpf.App/MainWindowViewModel_Commands.cs @@ -156,80 +156,99 @@ private async Task DownloadInstallationFilesFromAzureStorageAccountCommandHandle logger.Log(LogLevel.Trace, "Downloading installation files from Azure StorageAccount"); var reloadProjectInstallationFile = false; - var templateSettingsFileContentHash = GetTemplateSettingsWithInstallationFileContentHash(installationDirectory!); - if (templateSettingsFileContentHash is not null) + + try { - var projectNameTerms = ProjectName!.Split('.', StringSplitOptions.RemoveEmptyEntries); + var templateSettingsFileContentHash = GetTemplateSettingsWithInstallationFileContentHash(installationDirectory!); + if (templateSettingsFileContentHash is not null) + { + var projectNameTerms = ProjectName!.Split('.', StringSplitOptions.RemoveEmptyEntries); - var list = new List<(string ComponentName, string? ContentHash)> + var list = new List<(string ComponentName, string? ContentHash)> { ("Settings", templateSettingsFileContentHash), ($"{projectNameTerms[0]}.Settings", templateSettingsFileContentHash), }; - if (projectNameTerms.Length > 1) - { - list.Add(($"{projectNameTerms[0]}.{projectNameTerms[1]}.Settings", templateSettingsFileContentHash)); + if (projectNameTerms.Length > 1) + { + list.Add(($"{projectNameTerms[0]}.{projectNameTerms[1]}.Settings", templateSettingsFileContentHash)); + } + + var files = await azureStorageAccountInstallerService + .DownloadLatestFilesByNames( + AzureOptions!.StorageConnectionString, + AzureOptions!.BlobContainerName, + installationDirectory!.FullName, + list) + .ConfigureAwait(true); + + if (files.Any()) + { + reloadProjectInstallationFile = await ConfigurationFileHelper + .UpdateInstallationSettingsFromCustomAndTemplateSettingsIfNeeded(installationDirectory) + .ConfigureAwait(true); + } } - var files = await azureStorageAccountInstallerService + var componentFiles = await azureStorageAccountInstallerService .DownloadLatestFilesByNames( AzureOptions!.StorageConnectionString, AzureOptions!.BlobContainerName, installationDirectory!.FullName, - list) + GetComponentsWithInstallationFileContentHash()) .ConfigureAwait(true); - if (files.Any()) + var handledUnpackedZipFolderPaths = new List(); + foreach (var vm in ComponentProviders) { - reloadProjectInstallationFile = await ConfigurationFileHelper - .UpdateInstallationSettingsFromCustomAndTemplateSettingsIfNeeded(installationDirectory) - .ConfigureAwait(true); + var fileInfo = componentFiles.FirstOrDefault(x => x.Name.StartsWith(vm.Name, StringComparison.OrdinalIgnoreCase)); + if (fileInfo is null) + { + continue; + } + + vm.PrepareInstallationFiles(unpackIfExist: true); + vm.AnalyzeAndUpdateStatesInBackgroundThread(); + + logger.Log(LogLevel.Information, $"Downloaded installation file: {fileInfo.Name}"); + if (vm.UnpackedZipFolderPath is not null) + { + handledUnpackedZipFolderPaths.Add(vm.UnpackedZipFolderPath); + } } - } - - var componentFiles = await azureStorageAccountInstallerService - .DownloadLatestFilesByNames( - AzureOptions!.StorageConnectionString, - AzureOptions!.BlobContainerName, - installationDirectory!.FullName, - GetComponentsWithInstallationFileContentHash()) - .ConfigureAwait(true); - var handledUnpackedZipFolderPaths = new List(); - foreach (var vm in ComponentProviders) - { - var fileInfo = componentFiles.FirstOrDefault(x => x.Name.StartsWith(vm.Name, StringComparison.OrdinalIgnoreCase)); - if (fileInfo is null) + foreach (var vm in ComponentProviders) { - continue; + if (vm.UnpackedZipFolderPath is null || + handledUnpackedZipFolderPaths.Contains(vm.UnpackedZipFolderPath, StringComparer.Ordinal) || + DirectoryHelper.ExistsAndContainsFiles(vm.UnpackedZipFolderPath)) + { + continue; + } + + vm.PrepareInstallationFiles(unpackIfExist: true); + vm.AnalyzeAndUpdateStatesInBackgroundThread(); } - vm.PrepareInstallationFiles(unpackIfExist: true); - vm.AnalyzeAndUpdateStatesInBackgroundThread(); - - logger.Log(LogLevel.Information, $"Downloaded installation file: {fileInfo.Name}"); - if (vm.UnpackedZipFolderPath is not null) - { - handledUnpackedZipFolderPaths.Add(vm.UnpackedZipFolderPath); - } + logger.Log(LogLevel.Trace, "Downloaded installation files from Azure StorageAccount"); } - - foreach (var vm in ComponentProviders) + catch (Exception ex) { - if (vm.UnpackedZipFolderPath is null || - handledUnpackedZipFolderPaths.Contains(vm.UnpackedZipFolderPath, StringComparer.Ordinal) || - DirectoryHelper.ExistsAndContainsFiles(vm.UnpackedZipFolderPath)) - { - continue; - } + logger.Log(LogLevel.Error, ex, $"Error downloading installation files from Azure StorageAccount: {ex.Message}"); - vm.PrepareInstallationFiles(unpackIfExist: true); - vm.AnalyzeAndUpdateStatesInBackgroundThread(); + var dialogBox = new InfoDialogBox( + Application.Current.MainWindow!, + new DialogBoxSettings(DialogBoxType.Ok, LogCategoryType.Error) + { + TitleBarText = "Error", + Width = 480, + Height = 220, + }, + $"Error downloading installation files from Azure StorageAccount:{Environment.NewLine}{Environment.NewLine}{ex.Message}"); + dialogBox.ShowDialog(); } - logger.Log(LogLevel.Trace, "Downloaded installation files from Azure StorageAccount"); - IsBusy = false; if (reloadProjectInstallationFile) diff --git a/src/Atc.Installer.Wpf.App/MainWindowViewModel_LogicBase.cs b/src/Atc.Installer.Wpf.App/MainWindowViewModel_LogicBase.cs index 891fc74..9e36e34 100644 --- a/src/Atc.Installer.Wpf.App/MainWindowViewModel_LogicBase.cs +++ b/src/Atc.Installer.Wpf.App/MainWindowViewModel_LogicBase.cs @@ -10,12 +10,16 @@ public partial class MainWindowViewModel { private void LoadRecentOpenFiles() { + logger.Log(LogLevel.Trace, "Load RecentOpenFiles"); + var recentOpenFileViewModels = RecentOpenFileHelper.Load(App.InstallerProgramDataDirectory); RecentOpenFiles.Clear(); RecentOpenFiles.SuppressOnChangedNotification = true; RecentOpenFiles.AddRange(recentOpenFileViewModels); RecentOpenFiles.SuppressOnChangedNotification = false; + + logger.Log(LogLevel.Trace, $"Loaded RecentOpenFiles: {recentOpenFileViewModels.Count}"); } private void AddLoadedFileToRecentOpenFiles( @@ -23,7 +27,7 @@ private void AddLoadedFileToRecentOpenFiles( { RecentOpenFiles.Add(new RecentOpenFileViewModel(App.InstallerProgramDataProjectsDirectory, DateTime.Now, file.FullName)); - RecentOpenFileHelper.Save(App.InstallerProgramDataProjectsDirectory, RecentOpenFiles); + RecentOpenFileHelper.Save(App.InstallerProgramDataDirectory, RecentOpenFiles); LoadRecentOpenFiles(); } @@ -91,7 +95,17 @@ private async Task LoadConfigurationFile( catch (Exception ex) { logger.Log(LogLevel.Error, $"Configuration file: {file.FullName}, Error: {ex.Message}"); - MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK); + + var dialogBox = new InfoDialogBox( + Application.Current.MainWindow!, + new DialogBoxSettings(DialogBoxType.Ok, LogCategoryType.Error) + { + TitleBarText = "Error", + Width = 480, + Height = 220, + }, + $"Load configuration file:{Environment.NewLine}{Environment.NewLine}{ex.Message}"); + dialogBox.ShowDialog(); } } @@ -169,7 +183,17 @@ await ConfigurationFileHelper.SaveInstallationSettings( catch (Exception ex) { logger.Log(LogLevel.Error, $"Configuration file: {InstallationFile!.FullName}, Error: {ex.Message}"); - MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK); + + var dialogBox = new InfoDialogBox( + Application.Current.MainWindow!, + new DialogBoxSettings(DialogBoxType.Ok, LogCategoryType.Error) + { + TitleBarText = "Error", + Width = 480, + Height = 220, + }, + $"Save configuration file:{Environment.NewLine}{Environment.NewLine}{ex.Message}"); + dialogBox.ShowDialog(); } } diff --git a/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/.editorconfig b/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/.editorconfig index 821094e..93ca832 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/.editorconfig +++ b/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,9 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/Atc.Installer.Wpf.ComponentProvider.ElasticSearch.csproj b/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/Atc.Installer.Wpf.ComponentProvider.ElasticSearch.csproj index a8057bf..0f41c69 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/Atc.Installer.Wpf.ComponentProvider.ElasticSearch.csproj +++ b/src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/Atc.Installer.Wpf.ComponentProvider.ElasticSearch.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/.editorconfig b/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/.editorconfig index 821094e..93ca832 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/.editorconfig +++ b/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,9 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer.csproj b/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer.csproj index d4f3f16..3454861 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer.csproj +++ b/src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/.editorconfig b/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/.editorconfig index 821094e..93ca832 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/.editorconfig +++ b/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,9 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/Atc.Installer.Wpf.ComponentProvider.PostgreSql.csproj b/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/Atc.Installer.Wpf.ComponentProvider.PostgreSql.csproj index 0d1e812..ccfb71e 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/Atc.Installer.Wpf.ComponentProvider.PostgreSql.csproj +++ b/src/Atc.Installer.Wpf.ComponentProvider.PostgreSql/Atc.Installer.Wpf.ComponentProvider.PostgreSql.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/.editorconfig b/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/.editorconfig index 821094e..93ca832 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/.editorconfig +++ b/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,9 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/Atc.Installer.Wpf.ComponentProvider.WindowsApplication.csproj b/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/Atc.Installer.Wpf.ComponentProvider.WindowsApplication.csproj index 4a489eb..5c0bb24 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/Atc.Installer.Wpf.ComponentProvider.WindowsApplication.csproj +++ b/src/Atc.Installer.Wpf.ComponentProvider.WindowsApplication/Atc.Installer.Wpf.ComponentProvider.WindowsApplication.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/Atc.Installer.Wpf.ComponentProvider/.editorconfig b/src/Atc.Installer.Wpf.ComponentProvider/.editorconfig index 821094e..93ca832 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider/.editorconfig +++ b/src/Atc.Installer.Wpf.ComponentProvider/.editorconfig @@ -1,6 +1,6 @@ # ATC coding rules - https://github.com/atc-net/atc-coding-rules -# Version: 1.0.0 -# Updated: 27-03-2024 +# Version: 1.0.1 +# Updated: 06-06-2024 # Location: wpf # Distribution: Frameworks @@ -12,6 +12,9 @@ dotnet_diagnostic.MA0004.severity = error # Use Task.ConfigureAwait(false) https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md dotnet_diagnostic.MA0048.severity = none # To support partial classes - File will not match type name. +dotnet_diagnostic.CA2227.severity = none # Change property to be read-only by removing the property setter - https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227 + + ########################################## # Custom - Code Analyzers Rules ########################################## \ No newline at end of file diff --git a/src/Atc.Installer.Wpf.ComponentProvider/Atc.Installer.Wpf.ComponentProvider.csproj b/src/Atc.Installer.Wpf.ComponentProvider/Atc.Installer.Wpf.ComponentProvider.csproj index 448f97a..96808ce 100644 --- a/src/Atc.Installer.Wpf.ComponentProvider/Atc.Installer.Wpf.ComponentProvider.csproj +++ b/src/Atc.Installer.Wpf.ComponentProvider/Atc.Installer.Wpf.ComponentProvider.csproj @@ -15,11 +15,11 @@ - - - - - + + + + + diff --git a/test/Atc.Installer.Integration.WindowsApplication.Tests/Atc.Installer.Integration.WindowsApplication.Tests.csproj b/test/Atc.Installer.Integration.WindowsApplication.Tests/Atc.Installer.Integration.WindowsApplication.Tests.csproj index 2b943f6..3d6e0fd 100644 --- a/test/Atc.Installer.Integration.WindowsApplication.Tests/Atc.Installer.Integration.WindowsApplication.Tests.csproj +++ b/test/Atc.Installer.Integration.WindowsApplication.Tests/Atc.Installer.Integration.WindowsApplication.Tests.csproj @@ -7,7 +7,7 @@ - +