Skip to content

[Enhancement] Option for PrintIsNullOnExclude for DumpOptions #129

@sindizzy

Description

@sindizzy

Summary

Great library. I love it. Has helped me out with many of my projects. Kudos!
So I am using the DumpOptions.ExcludeProperties to exclude those fields that are too big to print. Mainly huge DataTables. That all works great but I would like to see if that class is null or not and that's it.

Possible option

// get a dump of all objects
DumpOptions dumpOps = new DumpOptions();
dumpOps.ExcludeProperties = new[] { "EmployeeContext }; // these fields are too big to print so exclude them
dumpOps.PrintIsNullOnExclude = true;
var strDump = ObjectDumper.Dump(obj, dumpOps);

Possible output

{DataSet}
  IsEditable: true
  EmployeeContext: {DbContext} : Null=True <-- this is humongous but just want to know if its null or not
  UserId: ZZ4578
  Year: 2024

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions