Skip to content

fix: endcoding in serialize for installation settings #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ dotnet_diagnostic.S6605.severity = none # Collection-specific "Exist
[*.{cs,csx,cake}]

dotnet_diagnostic.CA1040.severity = none # Avoid empty interface
dotnet_diagnostic.CA1515.severity = none # Because an application's API isn't typically referenced from outside the assembly, types can be made internal
dotnet_diagnostic.CA1724.severity = none # The type name App conflicts in whole or in part with the namespace name
dotnet_diagnostic.CA1848.severity = none # Skip for now: Use the LoggerMessage delegates
dotnet_diagnostic.CA1859.severity = suggestion # Use concrete types when possible for improved performance
Expand Down
5 changes: 0 additions & 5 deletions global.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public static string ConvertBase64ToHex(
string base64)
{
var bytes = Convert.FromBase64String(base64);
var hex = BitConverter.ToString(bytes).Replace("-", string.Empty, StringComparison.Ordinal);
return hex;
return Convert.ToHexString(bytes);
}
}
2 changes: 2 additions & 0 deletions src/Atc.Installer.Wpf.App/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ReSharper disable NotAccessedField.Local
// ReSharper disable AsyncVoidMethod
namespace Atc.Installer.Wpf.App;

/// <summary>
Expand Down Expand Up @@ -27,6 +28,7 @@ public static JsonSerializerOptions JsonSerializerOptions
{
var jsonSerializerOptions = JsonSerializerOptionsFactory.Create();
jsonSerializerOptions.PropertyNamingPolicy = null;
jsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping;
return jsonSerializerOptions;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Installer.Wpf.App/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ namespace Atc.Installer.Wpf.App;

internal static class AssemblyVersionInfo
{
public const string Version = "1.0.25.0";
public const string Version = "1.0.26.0";
}
1 change: 1 addition & 0 deletions src/Atc.Installer.Wpf.App/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
global using System.Reflection;
global using System.Runtime.CompilerServices;
global using System.Security.Cryptography;
global using System.Text.Encodings.Web;
global using System.Text.Json;
global using System.Text.Json.Serialization;
global using System.Windows;
Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Installer.Wpf.App/MainWindowViewModel_LogicBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private static string CalculateMd5(
using var md5 = MD5.Create();
using var stream = File.OpenRead(file.FullName);
var hash = md5.ComputeHash(stream);
return BitConverter.ToString(hash).Replace("-", string.Empty, StringComparison.Ordinal);
return Convert.ToHexString(hash);
}

[SuppressMessage("Design", "MA0051:Method is too long", Justification = "OK.")]
Expand Down
Loading