11 Commits

7 changed files with 51 additions and 52 deletions

View File

@@ -1,11 +1,9 @@
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<NeutralLanguage>en</NeutralLanguage>
<LangVersion>default</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`))">
@@ -32,6 +30,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Philips.CodeAnalysis.MaintainabilityAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@@ -1,35 +1,41 @@
<Project ToolsVersion="15.0">
<ItemGroup>
<PackageVersion Include="Aaru.Checksums.Native" Version="6.0.0-alpha.10"/>
<PackageVersion Include="Aaru.Checksums.Native" Version="6.0.0-alpha.11"/>
<PackageVersion Include="AsyncFixer" Version="1.6.0"/>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.2"/>
<PackageVersion Include="Avalonia.Desktop" Version="11.3.2"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.2"/>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.6"/>
<PackageVersion Include="Avalonia.Desktop" Version="11.3.6"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.6"/>
<PackageVersion Include="Avalonia.Svg.Skia" Version="11.3.0"/>
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.2"/>
<PackageVersion Include="Avalonia" Version="11.3.2"/>
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.6"/>
<PackageVersion Include="Avalonia" Version="11.3.6"/>
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0"/>
<PackageVersion Include="DotNetZip" Version="1.16.0"/>
<PackageVersion Include="EFCore.BulkExtensions" Version="9.0.1"/>
<PackageVersion Include="ErrorProne.NET.CoreAnalyzers" Version="0.1.2"/>
<PackageVersion Include="ErrorProne.NET.Structs" Version="0.1.2"/>
<PackageVersion Include="ErrorProne.NET.CoreAnalyzers" Version="0.8.2-beta.1"/>
<PackageVersion Include="ErrorProne.NET.Structs" Version="0.6.1-beta.1"/>
<PackageVersion Include="InclusivenessAnalyzer" Version="1.3.0"/>
<PackageVersion Include="MessageBox.Avalonia" Version="3.2.0"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.7"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.7"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.7"/>
<PackageVersion Include="Microsoft.Extensions.Localization" Version="9.0.7"/>
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.7"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0-rc.1.25451.107"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="10.0.0-rc.1.25451.107"/>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0-rc.1.25451.107"/>
<PackageVersion Include="Microsoft.Extensions.Localization" Version="10.0.0-rc.1.25451.107"/>
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.0-rc.1.25451.107"/>
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.12.1"/>
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.12.1"/>
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter" Version="4.12.1"/>
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15"/>
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0"/>
<PackageVersion Include="Mono.Fuse.NETStandard" Version="1.1.0"/>
<PackageVersion Include="Philips.CodeAnalysis.MaintainabilityAnalyzers" Version="1.6.3"/>
<PackageVersion Include="plist-cil" Version="2.2.0"/>
<PackageVersion Include="Philips.CodeAnalysis.MaintainabilityAnalyzers" Version="1.9.1"/>
<PackageVersion Include="plist-cil" Version="2.3.1"/>
<PackageVersion Include="Roslynator.Analyzers" Version="4.14.0"/>
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.14.0"/>
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.14.0"/>
<PackageVersion Include="SabreTools.Hashing" Version="1.2.3"/>
<PackageVersion Include="SabreTools.IO" Version="1.4.13"/>
<PackageVersion Include="SabreTools.Matching" Version="1.3.4"/>
<PackageVersion Include="SabreTools.Models" Version="1.5.8"/>
<PackageVersion Include="SabreTools.Skippers" Version="1.1.3"/>
<PackageVersion Include="Serilog" Version="4.3.0"/>
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0"/>
<PackageVersion Include="Serilog.Extensions.Logging" Version="9.0.2"/>
@@ -37,20 +43,11 @@
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0"/>
<PackageVersion Include="SharpCompress" Version="0.39.0"/>
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31"/>
<PackageVersion Include="System.IO.Compression" Version="4.3.0"/>
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0"/>
<PackageVersion Include="System.Text.Encoding.CodePages" Version="10.0.0-rc.1.25451.107"/>
<PackageVersion Include="Text.Analyzers" Version="4.14.0"/>
<PackageVersion Include="winfsp.net" Version="2.1.25156"/>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageVersion Include="SabreTools.Hashing" Version="1.2.3"/>
<PackageVersion Include="SabreTools.IO" Version="1.4.13"/>
<PackageVersion Include="SabreTools.Matching" Version="1.3.4"/>
<PackageVersion Include="SabreTools.Skippers" Version="1.1.3"/>
<PackageVersion Include="System.IO.Compression" Version="4.3.0"/>
<PackageVersion Include="SharpCompress" Version="0.38.0"/>
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0"/>
<PackageVersion Include="ZstdSharp.Port" Version="0.8.6"/>
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.12.1"/>
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.12.1"/>
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="3.116.1" Condition="$(RuntimeIdentifier.StartsWith('linux'))" />
</ItemGroup>
</Project>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<PublishSingleFile>true</PublishSingleFile>

View File

@@ -50,52 +50,52 @@ public static class BigEndianBitConverter
/// <summary>Returns the specified Boolean value as an array of bytes.</summary>
/// <param name="value">A Boolean value.</param>
/// <returns>An array of bytes with length 1.</returns>
public static byte[] GetBytes(bool value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(bool value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified Unicode character value as an array of bytes.</summary>
/// <param name="value">A character to convert.</param>
/// <returns>An array of bytes with length 2.</returns>
public static byte[] GetBytes(char value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(char value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified double-precision floating point value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 8.</returns>
public static byte[] GetBytes(double value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(double value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified single-precision floating point value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 4.</returns>
public static byte[] GetBytes(float value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(float value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified 32-bit signed integer value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 4.</returns>
public static byte[] GetBytes(int value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(int value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified 64-bit signed integer value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 8.</returns>
public static byte[] GetBytes(long value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(long value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified 16-bit signed integer value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 2.</returns>
public static byte[] GetBytes(short value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(short value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified 32-bit unsigned integer value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 4.</returns>
public static byte[] GetBytes(uint value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(uint value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified 64-bit unsigned integer value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 8.</returns>
public static byte[] GetBytes(ulong value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(ulong value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Returns the specified 16-bit unsigned integer value as an array of bytes.</summary>
/// <param name="value">The number to convert.</param>
/// <returns>An array of bytes with length 2.</returns>
public static byte[] GetBytes(ushort value) => BitConverter.GetBytes(value).Reverse().ToArray();
public static byte[] GetBytes(ushort value) => Enumerable.ToArray(Enumerable.Reverse(BitConverter.GetBytes(value)));
/// <summary>Converts the specified 64-bit signed integer to a double-precision floating point number.</summary>
/// <param name="value">The number to convert.</param>
@@ -154,7 +154,7 @@ public static class BigEndianBitConverter
/// minus 1.
/// </exception>
public static short ToInt16(byte[] value, int startIndex) =>
BitConverter.ToInt16(value.Reverse().ToArray(), value.Length - sizeof(short) - startIndex);
BitConverter.ToInt16(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(short) - startIndex);
/// <summary>Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.</summary>
/// <param name="value">An array of bytes.</param>
@@ -170,7 +170,7 @@ public static class BigEndianBitConverter
/// minus 1.
/// </exception>
public static int ToInt32(byte[] value, int startIndex) =>
BitConverter.ToInt32(value.Reverse().ToArray(), value.Length - sizeof(int) - startIndex);
BitConverter.ToInt32(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(int) - startIndex);
/// <summary>Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.</summary>
/// <param name="value">An array of bytes.</param>
@@ -186,7 +186,7 @@ public static class BigEndianBitConverter
/// length of value minus 1.
/// </exception>
public static long ToInt64(byte[] value, int startIndex) =>
BitConverter.ToInt64(value.Reverse().ToArray(), value.Length - sizeof(long) - startIndex);
BitConverter.ToInt64(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(long) - startIndex);
/// <summary>
/// Returns a single-precision floating point number converted from four bytes at a specified position in a byte
@@ -205,7 +205,7 @@ public static class BigEndianBitConverter
/// length of value minus 1.
/// </exception>
public static float ToSingle(byte[] value, int startIndex) =>
BitConverter.ToSingle(value.Reverse().ToArray(), value.Length - sizeof(float) - startIndex);
BitConverter.ToSingle(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(float) - startIndex);
/// <summary>
/// Converts the numeric value of each element of a specified array of bytes to its equivalent hexadecimal string
@@ -217,7 +217,7 @@ public static class BigEndianBitConverter
/// element in value; for example, "7F-2C-4A".
/// </returns>
/// <exception cref="System.ArgumentNullException">value is null.</exception>
public static string ToString(byte[] value) => BitConverter.ToString(value.Reverse().ToArray());
public static string ToString(byte[] value) => BitConverter.ToString(Enumerable.ToArray(Enumerable.Reverse(value)));
/// <summary>
/// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal
@@ -235,7 +235,7 @@ public static class BigEndianBitConverter
/// minus 1.
/// </exception>
public static string ToString(byte[] value, int startIndex) =>
BitConverter.ToString(value.Reverse().ToArray(), startIndex);
BitConverter.ToString(Enumerable.ToArray(Enumerable.Reverse(value)), startIndex);
/// <summary>
/// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal
@@ -258,7 +258,7 @@ public static class BigEndianBitConverter
/// value; that is, the startIndex parameter is greater than the length of value minus the length parameter.
/// </exception>
public static string ToString(byte[] value, int startIndex, int length) =>
BitConverter.ToString(value.Reverse().ToArray(), startIndex, length);
BitConverter.ToString(Enumerable.ToArray(Enumerable.Reverse(value)), startIndex, length);
/// <summary>Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.</summary>
/// <param name="value">The array of bytes.</param>
@@ -271,7 +271,7 @@ public static class BigEndianBitConverter
/// minus 1.
/// </exception>
public static ushort ToUInt16(byte[] value, int startIndex) =>
BitConverter.ToUInt16(value.Reverse().ToArray(), value.Length - sizeof(ushort) - startIndex);
BitConverter.ToUInt16(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(ushort) - startIndex);
/// <summary>Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.</summary>
/// <param name="value">An array of bytes.</param>
@@ -287,7 +287,7 @@ public static class BigEndianBitConverter
/// minus 1.
/// </exception>
public static uint ToUInt32(byte[] value, int startIndex) =>
BitConverter.ToUInt32(value.Reverse().ToArray(), value.Length - sizeof(uint) - startIndex);
BitConverter.ToUInt32(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(uint) - startIndex);
/// <summary>Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.</summary>
/// <param name="value">An array of bytes.</param>
@@ -303,7 +303,7 @@ public static class BigEndianBitConverter
/// minus 1.
/// </exception>
public static ulong ToUInt64(byte[] value, int startIndex) =>
BitConverter.ToUInt64(value.Reverse().ToArray(), value.Length - sizeof(ulong) - startIndex);
BitConverter.ToUInt64(Enumerable.ToArray(Enumerable.Reverse(value)), value.Length - sizeof(ulong) - startIndex);
public static Guid ToGuid(byte[] value, int startIndex) => new(ToUInt32(value, 0 + startIndex),
ToUInt16(value, 4 + startIndex),

View File

@@ -6,6 +6,7 @@
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0-beta.1</InformationalVersion>
<Copyright>© $([System.DateTime]::Now.Year) Natalia Portillo</Copyright>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>

View File

@@ -48,7 +48,6 @@
<PackageReference Include="Serilog.Sinks.Console"/>
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer"/>
<PackageReference Include="Text.Analyzers"/>
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Condition="$(RuntimeIdentifier.StartsWith('linux'))"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RomRepoMgr.Database\RomRepoMgr.Database.csproj"/>