diff --git a/appveyor.yml b/appveyor.yml
index ee03dba..24446aa 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,16 +1,16 @@
################################################################
-# Auto-generated 2024-09-23 00:06:21.373 #
+# Auto-generated 2024-09-23 00:18:36.902 #
# ANY CHANGES TO THIS DOCUMENT WILL BE LOST UPON RE-GENERATION #
################################################################
#
-# git commit: 8312ce66bcf57074cebec0171c6a3dbeb45e781a
-version: 1.0.31.8811
+# git commit: f86513de8827a2546bd714eec75b92f733d615a7
+version: 1.0.35.8811
image: Visual Studio 2022
configuration: Release
install:
- - ps: Invoke-WebRequest "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile ".\lib\install-dotnet.ps1"
+ - ps: Invoke-WebRequest "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile ".\install-dotnet.ps1"
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
- - ps: '.\lib\install-dotnet.ps1 -Version "9.0.100-rc.1.24452.12" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
+ - ps: '.\install-dotnet.ps1 -Version "9.0.100-rc.1.24452.12" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
- ps: $env:Path += ";$env:DOTNET_INSTALL_DIR"
before_build:
#- cmd: nuget restore "Unknown6656.Console.sln"
diff --git a/src/AssemblyInfo.cs b/src/AssemblyInfo.cs
index 3c89f2b..a01bbce 100644
--- a/src/AssemblyInfo.cs
+++ b/src/AssemblyInfo.cs
@@ -1,15 +1,15 @@
//////////////////////////////////////////////////////////////////////////
-// Auto-generated 2024-09-23 00:06:21.373 //
+// Auto-generated 2024-09-23 00:18:36.902 //
// ANY CHANGES TO THIS DOCUMENT WILL BE LOST UPON RE-GENERATION //
//////////////////////////////////////////////////////////////////////////
using System.Reflection;
using System;
-[assembly: AssemblyVersion("1.0.31.8811")]
-[assembly: AssemblyFileVersion("1.0.31.8811")]
-[assembly: AssemblyInformationalVersion("v.1.0.31.8811, commit: 8312ce66bcf57074cebec0171c6a3dbeb45e781a")]
+[assembly: AssemblyVersion("1.0.35.8811")]
+[assembly: AssemblyFileVersion("1.0.35.8811")]
+[assembly: AssemblyInformationalVersion("v.1.0.35.8811, commit: f86513de8827a2546bd714eec75b92f733d615a7")]
[assembly: AssemblyCompany("Unknown6656")]
[assembly: AssemblyCopyright("Copyright © 2020 - 2024, Unknown6656")]
[assembly: AssemblyProduct("Unknown6656.Console by Unknown6656")]
@@ -37,11 +37,11 @@ public static class __module__
///
/// The library's current version.
///
- public static Version? LibraryVersion { get; } = Version.Parse("1.0.31.8811");
+ public static Version? LibraryVersion { get; } = Version.Parse("1.0.35.8811");
///
/// The Git hash associated with the current build.
///
- public const string GitHash = "8312ce66bcf57074cebec0171c6a3dbeb45e781a";
+ public const string GitHash = "f86513de8827a2546bd714eec75b92f733d615a7";
///
/// The name of the GitHub repository associated with .
///
@@ -51,7 +51,7 @@ public static class __module__
///
public const string RepositoryURL = "https://github.com/Unknown6656-Megacorp/Unknown6656.Console";
///
- /// The date and time of the current build (2024-09-23 00:06:21.373).
+ /// The date and time of the current build (2024-09-23 00:18:36.902).
///
- public static DateTime DateBuilt { get; } = DateTime.FromFileTimeUtc(0x01db0d3ba8335b69L);
+ public static DateTime DateBuilt { get; } = DateTime.FromFileTimeUtc(0x01db0d3d5e9c3b5dL);
}
diff --git a/src/ConsoleColor.cs b/src/ConsoleColor.cs
index 21c98b4..8d4b0e6 100644
--- a/src/ConsoleColor.cs
+++ b/src/ConsoleColor.cs
@@ -465,6 +465,7 @@ public string GetVT520SGRCode(ColorMode mode)
.StringJoin(";");
#pragma warning disable CS8509 // The switch expression does not handle all possible values of its input type (it is not exhaustive).
+#pragma warning disable CS8524 // The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value.
if (_color is null)
return mode switch
{
@@ -474,15 +475,31 @@ public string GetVT520SGRCode(ColorMode mode)
};
else if (_color.Is(out sysconsolecolor color))
{
- int colvalue = (int)color;
- (int lo, int hi) = mode switch
+ (string bg, string fg) = color switch
{
- ColorMode.Foreground => (30, 90),
- ColorMode.Background => (40, 100),
- ColorMode.Underline => throw new ArgumentException($"Underline color in combination with '{typeof(sysconsolecolor)}' is not supported in VT520.", nameof(mode)),
+ sysconsolecolor.Black => ("40", "30"),
+ sysconsolecolor.DarkBlue => ("44", "34"),
+ sysconsolecolor.DarkGreen => ("42", "32"),
+ sysconsolecolor.DarkCyan => ("46", "36"),
+ sysconsolecolor.DarkRed => ("41", "31"),
+ sysconsolecolor.DarkMagenta => ("45", "35"),
+ sysconsolecolor.DarkYellow => ("43", "33"),
+ sysconsolecolor.Gray => ("47", "37"),
+ sysconsolecolor.DarkGray => ("100", "90"),
+ sysconsolecolor.Blue => ("104", "94"),
+ sysconsolecolor.Green => ("102", "92"),
+ sysconsolecolor.Cyan => ("106", "96"),
+ sysconsolecolor.Red => ("101", "91"),
+ sysconsolecolor.Magenta => ("105", "95"),
+ sysconsolecolor.Yellow => ("103", "93"),
+ sysconsolecolor.White => ("107", "97"),
};
- return (colvalue + (colvalue < 8 ? lo : hi - 8)).ToString();
+ return mode switch
+ {
+ ColorMode.Foreground => fg,
+ ColorMode.Background => bg,
+ };
}
else if (_color.Is(out Color rgb))
return $"{mode switch
@@ -493,6 +510,7 @@ public string GetVT520SGRCode(ColorMode mode)
}};2;{rgb.R};{rgb.G};{rgb.B}";
else
throw new InvalidOperationException($"Invalid color type '{_color}'.");
+#pragma warning restore CS8524
#pragma warning restore CS8509
}
diff --git a/util/Program.cs b/util/Program.cs
index 597edd8..c09d7dd 100644
--- a/util/Program.cs
+++ b/util/Program.cs
@@ -196,9 +196,9 @@ public static class __module__
image: Visual Studio 2022
configuration: Release
install:
- - ps: Invoke-WebRequest "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile ".\lib\install-dotnet.ps1"
+ - ps: Invoke-WebRequest "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile ".\install-dotnet.ps1"
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
- - ps: '.\lib\install-dotnet.ps1 {(DOTNET_PREVIEW ? "-Channel Preview" : "")} -Version "{DOTNET_VERSION}" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
+ - ps: '.\install-dotnet.ps1 {(DOTNET_PREVIEW ? "-Channel Preview" : "")} -Version "{DOTNET_VERSION}" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
- ps: $env:Path += ";$env:DOTNET_INSTALL_DIR"
before_build:
#- cmd: nuget restore "{Path.GetRelativePath(dir_reporoot.FullName, path_sln.FullName).Replace('\\', '/')}"
diff --git a/version.txt b/version.txt
index 02a5b93..496f205 100644
--- a/version.txt
+++ b/version.txt
@@ -1,2 +1,2 @@
-1.0.31.8811
-8312ce66bcf57074cebec0171c6a3dbeb45e781a
\ No newline at end of file
+1.0.35.8811
+f86513de8827a2546bd714eec75b92f733d615a7
\ No newline at end of file