PrettyConsole 2.1.1

dotnet add package PrettyConsole --version 2.1.1                
NuGet\Install-Package PrettyConsole -Version 2.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PrettyConsole" Version="2.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PrettyConsole --version 2.1.1                
#r "nuget: PrettyConsole, 2.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PrettyConsole as a Cake Addin
#addin nuget:?package=PrettyConsole&version=2.1.1

// Install PrettyConsole as a Cake Tool
#tool nuget:?package=PrettyConsole&version=2.1.1                

CHANGELOG

v2.1.0 - v2.1.1

  • Fixed default colors, previously colors where defaulted to Color.Gray for foreground and Color.Black for background, however many shells have custom colors that they render by default, which means the default colors seemed to render in a non ordinary fashion. The default colors now are Color.Unknown which will actually use the colors of the shell.
  • ProgressBar now implements IDisposable since the implementation has been optimized, make sure to dispose of it, lest you induce a penalty on other such optimization which are now spread across the library.
  • Introduced an overload to Write that accepts any T : ISpanFormattable. In many cases users might want to print structs or other types that implement this interface such as int, double, DateTime and more... splitting the output into a few lines and using this overload will enable you completely avoid the string allocation for this object, the overload is using a fixed size buffer to format the item and prints it using a span. However, this limitation means that if the formatted item is longer than 50 characters, an exception will be thrown indicating that you should use a different overload.

Note

Reviewing the codebase, I can already see that there are many places which will greatly benefit from the upcoming features of .NET 9. Features such as the params ReadOnlySpan<T> feature would enable me to delete a lot of overloads without decreasing compatibility, yet gain a performance boost. Expect a new version soon after .NET 9 is released.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.