PrettyConsole 3.0.0-rc.2
This is a prerelease version of PrettyConsole.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PrettyConsole --version 3.0.0-rc.2
NuGet\Install-Package PrettyConsole -Version 3.0.0-rc.2
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="3.0.0-rc.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PrettyConsole --version 3.0.0-rc.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PrettyConsole, 3.0.0-rc.2"
#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=3.0.0-rc.2&prerelease // Install PrettyConsole as a Cake Tool #tool nuget:?package=PrettyConsole&version=3.0.0-rc.2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Changelog
v3.0.0 - RC1
- Removed
Write
andWriteLine
overloads that contains multipleColoredOutput
s, when using the overload withReadOnlySpan<ColoredOutput>
andCollectionExpression
, the compiler generates an inline array to hold the elements, this is very efficient, and the reduced complexity allows usage of multipleColoredOutput
s in more places. - All overloads of all functions that previously took only one
ColoredOutput
now take aReadOnlySpan<ColoredOutput>
instead, as noted it will use an inline array, and the internal implementation also has fast paths for size 1. - All fast changing outputs (
ProgressBar
,IndeterminateProgressBar
,OverrideCurrentLine
) now uses the error output pipe by default, this means that if the consumer will pipe the output to another cli, it won't be filled with garbage and retain only the valuable stuff. - Added
ReadOnlySpan<ColoredOutput>
overloads toWriteError
andWriteLineError
. - Added overloads for all variants of
ReadLine
andTryReadLine
that supportT @default
that will be returned if parsing fails. Write
,WriteLine
,WriteError
andWriteLineError
no longer haveparams ColoredOutput[]
overloads, they instead have aReadOnlySpan<ColoredOutput>
overload. This performs even better as it uses an inline array, and the removal of the restrictions on whereparams
can be used, allowedReadOnlySpan<ColoredOutput>
to replace virtually allow singleColoredOutput
methods as well. Allowing greater customization in any function.- You can now access the
In
,Out
, andError
streams ofSystem.Console
directly fromPrettyConsole.Console
by using the propertiesOut
,Error
, andIn
. This reduces verbosity since the names of the classes have collisions. - Added
SetColors
to allow setting the colors of the console output. ClearNextLines
now also has aClearNextLinesError
brother which does the same for theError
stream.NewLineError
was also added for this.- To enhance customization in extreme high perf scenarios where you write a
ReadOnlySpan<char>
directly to the output stream, theWrite
andWriteError
methods now have overloads that take aReadOnlySpan<char>
instead of aReadOnlySpan<ColoredOutput>
, along with foreground and background colors. - Added
Write
andWriteError
variants forT : ISpanFormattable
as well. ProgressBar
should now be even more performant as internal progress tracking allowed cutting the required operations by 20%.Color
will now containstatic readonly ConsoleColor
fields for bothForeground
andBackground
colors, they will be initialized during runtime to support all platforms (fixing the instant crashes on Windows).- You can also refer them when you want to use the defaults for any reason.
- The base methods which are used for outputting
ReadOnlySpan<ColoredOutput>
have been re-written to reduce assembly instructions, leading to about 15-20% runtime improvements across the board, and reducing by the binary size by a few bytes too lol. Console
andColor
now have the correct attributes to disallow compilation on unsupported platforms, if anyone tries to use them now (even thought it should've been obvious that they shouldn't be used on unsupported platforms), it should display the right message at build time.- Removed all overloads that have options to change the input colors, it invites non-streamlined usage, and just increases the code complexity to maintain. Without them the code is simpler and more performant.
Product | Versions 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
- Sharpify (>= 2.4.0-alpha)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.1.0 | 208 | 11/14/2024 | |
3.0.0 | 282 | 10/21/2024 | |
3.0.0-rc.2 | 44 | 10/16/2024 | |
3.0.0-rc.1 | 51 | 10/11/2024 | |
2.1.1 | 143 | 8/25/2024 | |
2.1.0 | 119 | 8/23/2024 | |
2.0.0 | 173 | 3/2/2024 | |
1.6.1 | 261 | 6/30/2023 | |
1.6.0 | 221 | 6/26/2023 | |
1.5.2 | 254 | 4/14/2023 | |
1.5.1 | 361 | 12/21/2022 | |
1.5.0 | 407 | 12/4/2022 | |
1.4.0 | 481 | 8/4/2022 | |
1.3.0 | 472 | 7/14/2022 | |
1.2.0 | 454 | 7/5/2022 | |
1.1.0 | 456 | 6/18/2022 | |
1.0.2 | 481 | 6/14/2022 | |
1.0.1 | 496 | 6/14/2022 | |
1.0.0 | 514 | 6/12/2022 |