RJDev.Outputter 1.1.0

dotnet add package RJDev.Outputter --version 1.1.0                
NuGet\Install-Package RJDev.Outputter -Version 1.1.0                
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="RJDev.Outputter" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RJDev.Outputter --version 1.1.0                
#r "nuget: RJDev.Outputter, 1.1.0"                
#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 RJDev.Outputter as a Cake Addin
#addin nuget:?package=RJDev.Outputter&version=1.1.0

// Install RJDev.Outputter as a Cake Tool
#tool nuget:?package=RJDev.Outputter&version=1.1.0                

Outputter

Manager of Your application or library text output.

Imagine you are building library which has async semantic text output, which can be formatted and written into the console, file or streamed somewhere else, all at once. Well that is what the Outputter can do.

Examples

Simple example:

using RJDev.Outputter;
using RJDev.Outputter.Sinks;

// Create outputter instance
var outputter = new Outputter();

// Write something into the output
outputter.OutputWriter.WriteLine($"Hello World! {Math.PI:N4}");
outputter.OutputWriter.WriteLine("Hello World! {0:N4}", Math.PI);

// No more messages expected
outputter.Complete();


// Use Pipe() to consume output entries; can/should be async
await outputter.OutputReader
    .Pipe(new SimpleLambdaSink(entry =>
    {
        Console.Write(entry.ToString());
    }));

Example using Tokenizer:

using RJDev.Outputter;
using RJDev.Outputter.Sinks;
using RJDev.Outputter.Parsing;

// Create outputter instance
var outputter = new Outputter();

// Write something into the output
outputter.OutputWriter.WriteLine($"Hello World! {Math.PI:N4}");
outputter.OutputWriter.WriteLine("Hello World! {0:N4}", Math.PI);

// No more messages expected
outputter.Complete();


// Use Pipe() to consume output entries; can/should be async
Tokenizer tokenizer = new(); // Tokenizer is used to tokenize entries into parts

await outputter.OutputReader
    .Pipe(new SimpleLambdaSink(entry =>
    {
        // Tokenize template
        IEnumerable<IEntryToken> tokens = tokenizer.Tokenize(entry.MessageTemplate, entry.Args);
        
        foreach (IEntryToken token in tokens)
        {
            // If it is any of the argument tokens, use colored write
            if ((token.TokenType & TokenType.Argument) != 0)
            {
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                token.Write(Console.Out);
                Console.ForegroundColor = ConsoleColor.White;
            }
            else
            {
                token.Write(Console.Out);
            }
        }
    }));
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on RJDev.Outputter:

Package Downloads
RJDev.Tyml.Core

Library which is able to take YAML file in given format and process its instructions. It is like Your private local pipeline.

RJDev.Outputter.Sinks.Console

Package Description

RJDev.Outputter.Formatting.Json

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 329 8/29/2023
1.0.2 1,539 11/3/2021
1.0.1 361 11/2/2021
1.0.0 989 3/21/2021
0.1.0 497 3/18/2021