Skip to content
ConsoleMonster

API Reference

Class

InspectorOptions

Namespace ConsoleMonster.Data
Assembly ConsoleMonster
Modifiers sealed

Controls depth, collection, member filtering and member source selection.

Inheritance

  • Object
  • InspectorOptions

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 3

Constructors

public InspectorOptions() #

Methods

public static Int32 DefaultDepthFor(Int32 fieldCount, Int32 narrowDepth = 3) #
Returns: Int32

The depth a tree starts with for an object when none is asked for: wide objects (more than InspectorOptions.WideObjectFields members, such as a process or a file) open one level, since every nested level multiplies their size; small records and parsed JSON open narrowDepth levels.

Parameters

fieldCount System.Int32 requiredposition: 0
The number of members the object shows.
narrowDepth System.Int32 = 3 optionalposition: 1
The depth for objects that are not wide (default 3).

Returns

The depth.

Properties

public Int32 MaxDepth { get; set; } #

Maximum node depth below the root.

public Int32 MaxItems { get; set; } #

Maximum collection items listed.

public Int32 MaxColumns { get; set; } #

Maximum tabular columns exposed.

public Int32 MaxNodes { get; set; } #

Maximum nodes in one inspection (default 5,000). Wide objects grow as members to the power of depth; once the budget is spent, the inspector adds one "node limit reached" marker and stops reading further members and items.

public IList<String> Include { get; } #

Optional member-name wildcard allow list.

public IList<String> Exclude { get; } #

Optional member-name wildcard deny list. Excluded members are never read, so this is also the skip list for getters that are slow, block or have side effects.

public IList<String> Order { get; } #

Member names to place first, in listed order.

public Boolean UseReflection { get; set; } #

Whether public-property reflection is used as the final built-in source.

public IList<IMemberSource> Sources { get; } #

Custom sources, consulted before built-in sources.

public Func<Object, Object>? Unwrap { get; set; } #

Optional host callback applied to each non-null value before the inspector classifies it. Use this to strip host wrapper objects while preserving the wrapped value's identity for cycle detection.

public Func<Object, Object>? Identity { get; set; } #

Optional host callback that gives the identity of a value for cycle detection (for example the object a host wrapper wraps, since a new wrapper can be created for every read), or null to use the value itself.

public TimeSpan TimeBudget { get; set; } #

How long one inspection may spend reading values (default 2 seconds; zero or less for no limit).

Fields

public const Int32 WideObjectFields #

The member count above which an object counts as wide for InspectorOptions.DefaultDepthFor (12).

Value: 12