Dumpify 0.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dumpify --version 0.5.2                
NuGet\Install-Package Dumpify -Version 0.5.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="Dumpify" Version="0.5.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dumpify --version 0.5.2                
#r "nuget: Dumpify, 0.5.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 Dumpify as a Cake Addin
#addin nuget:?package=Dumpify&version=0.5.2

// Install Dumpify as a Cake Tool
#tool nuget:?package=Dumpify&version=0.5.2                

Dumpify

Improve productivity and debuggability by adding .Dump() extension methods to Console Applications. Dump any object in a structured and colorful way into the Console, Trace, Debug events or your own custom output.

Features

  • Dump any object in a structured, colorful way to Console, Debug, Trace or any other custom output
  • Support Properties, Fields and non-public members
  • Support max nesting levels
  • Support circular dependencies and references
  • Support styling and customizations
  • Highly Configurable
  • Support for differnt otuput targets: Console, Trace, Debug, Text, Custom
  • Fast!

Examples:

Anonymous types

new { Name = "Dumpify", Description = "Dump any object to Console" }.Dump();

image

Support nesting and circular references

var moaid = new Person { FirstName = "Moaid", LastName = "Hathot" };
var haneeni = new Person { FirstName = "Haneeni", LastName = "Shibli" };

moaid.Spouse = haneeni;
haneeni.Spouse = moaid;

moaid.Dump();
//You can define max depth as well, e.g `moaid.Dump(maxDepth: 2)`

image

Support for Arrrays, Dictionaries and Collections

var arr = new[] { 1, 2, 3, 4 }.Dump();

image

var arr2d = new int[,] { {1, 2}, {3, 4} }.Dump();

image

new Dictionary<string, string>
{
    ["Moaid"] = "Hathot",
    ["Haneeni"] = "Shibli",
    ["Eren"] = "Yeager",
    ["Mikasa"] = "Ackerman",
}.Dump();

image

You can turn on or off fields and private members

public class AdditionValue
{
    private readonly int _a;
    private readonly int _b;

    public AdditionValue(int a, int b)
    {
        _a = a;
        _b = b;
    }

    private int Value => _a + _b;
}


new AdditionValue(1, 2).Dump(members: new MembersConfig { IncludeFields = true, IncludeNonPublicMembers = true });

image

You can customize colors

var package = new { Name = "Dumpify", Description = "Dump any object to Console" };
package.Dump(colors: ColorConfig.NoColors);
package.Dump(colors: new ColorConfig { PropertyValueColor = new DumpColor(Color.RoyalBlue)});

image

You can turn on or off type names, headers, lables and much more

var moaid = new Person { FirstName = "Moaid", LastName = "Hathot", Profession = Profession.Software };
var haneeni = new Person { FirstName = "Haneeni", LastName = "Shibli", Profession = Profession.Health };
moaid.Spouse = haneeni;
haneeni.Spouse = moaid;

moaid.Dump(typeNames: new TypeNamingConfig { ShowTypeNames = false }, tableConfig: new TableConfig { ShowTableHeaders = false });

image

There are multiple output options (Console, Trace, Debug, Text) or provide your own

var package = new { Name = "Dumpify", Description = "Dump any object to Console" };
package.Dump(); //Similar to `package.DumpConsole()` and `package.Dump(output: Outputs.Console))`
package.DumpDebug(); //Dump to Visual Studio's Debug source
package.DumpTrace(); //Dump to Trace 
var text = package.DumpText(); //The table in a text format

using var writer = new StringWriter();
package.Dump(output: new DumpOutput(writer)); //Custom output

Every configuration can be defiend per-Dump or globally for all Dumps, e.g:

DumpConfig.Default.TypeNamingConfig.UseAliases = true;
DumpConfig.Default.TypeNamingConfig.ShowTypeNames = false;
DumpConfig.Default.ColorConfig.TypeNameColor = Color.Gold;
DumpConfig.Default.MaxDepth = 3;
//Much more...
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 is compatible.  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. 
.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 (7)

Showing the top 5 NuGet packages that depend on Dumpify:

Package Downloads
rna.Base.Extensions

Number, String, Enum, Expression Extensions and Object Property Filters

EluciusFTW.SpectreCoff

A thin, opinionated wrapper around Spectre.Console in FSharp.

PowerFx.NET.Interactive

This is a Kernel extension for Polyglot Notebooks that helps you to run Power Fx code

FluentConsole.Templates

提供「现代化的控制台应用的开发体验」脚手架,能像 Web 应用那样很优雅地整合各种组件,包括依赖注入、配置、日志等功能。

ProduceSelf.Base

修复PDF图片选项命名空间

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.6 62,312 5/5/2024
0.6.5 55,464 2/17/2024
0.6.4 6,112 12/30/2023
0.6.3 7,134 12/4/2023
0.6.2 146 12/4/2023
0.6.1 3,717 11/25/2023
0.6.0 28,618 7/17/2023
0.5.4 20,068 5/17/2023
0.5.3 455 5/8/2023
0.5.2 528 4/15/2023
0.5.1 213 4/14/2023
0.5.0 208 4/14/2023
0.4.1 284 4/7/2023
0.4.0 209 4/6/2023
0.3.0 210 4/3/2023
0.2.0 210 4/3/2023
0.1.0 309 3/29/2023