InspectorOptions
ConsoleMonster.Data
Controls depth, collection, member filtering and member source selection.
Inheritance
- object
- InspectorOptions
Usage
Explore 59 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.
Returned or exposed by 27
- Extension method InspectorOptions.Exclude
- Extension method InspectorOptions.IdentityBy
- Extension method InspectorOptions.Include
- Extension method InspectorOptions.MaxColumns
- Extension method InspectorOptions.MaxDepth
- Extension method InspectorOptions.MaxItems
- Extension method InspectorOptions.MaxNodes
- Extension method InspectorOptions.Order
- Extension method InspectorOptions.Source
- Extension method InspectorOptions.Sources
- Extension method InspectorOptions.TimeBudget
- Extension method InspectorOptions.UnwrapBy
- Extension method InspectorOptions.UseReflection
- Method InspectorOptionsFluent.Exclude
- Method InspectorOptionsFluent.IdentityBy
- Method InspectorOptionsFluent.Include
- Method InspectorOptionsFluent.MaxColumns
- Method InspectorOptionsFluent.MaxDepth
- Method InspectorOptionsFluent.MaxItems
- Method InspectorOptionsFluent.MaxNodes
- Method InspectorOptionsFluent.Order
- Method InspectorOptionsFluent.Source
- Method InspectorOptionsFluent.Sources
- Method InspectorOptionsFluent.TimeBudget
- Method InspectorOptionsFluent.UnwrapBy
- Method InspectorOptionsFluent.UseReflection
- Property ObjectExplorer.Options
Accepted by parameters 32
- Method ColumnInference.Infer
- Extension method InspectorOptions.Exclude
- Extension method InspectorOptions.IdentityBy
- Extension method InspectorOptions.Include
- Extension method InspectorOptions.MaxColumns
- Extension method InspectorOptions.MaxDepth
- Extension method InspectorOptions.MaxItems
- Extension method InspectorOptions.MaxNodes
- Extension method InspectorOptions.Order
- Extension method InspectorOptions.Source
- Extension method InspectorOptions.Sources
- Extension method InspectorOptions.TimeBudget
- Extension method InspectorOptions.UnwrapBy
- Extension method InspectorOptions.UseReflection
- Method InspectorOptionsFluent.Exclude
- Method InspectorOptionsFluent.IdentityBy
- Method InspectorOptionsFluent.Include
- Method InspectorOptionsFluent.MaxColumns
- Method InspectorOptionsFluent.MaxDepth
- Method InspectorOptionsFluent.MaxItems
- Method InspectorOptionsFluent.MaxNodes
- Method InspectorOptionsFluent.Order
- Method InspectorOptionsFluent.Source
- Method InspectorOptionsFluent.Sources
- Method InspectorOptionsFluent.TimeBudget
- Method InspectorOptionsFluent.UnwrapBy
- Method InspectorOptionsFluent.UseReflection
- Method ObjectInspector.Inspect
- Constructor ObjectExplorer.ObjectExplorer
- Extension method ObjectExplorer.Options
- Method ObjectExplorerFluent.Options
- Constructor InspectorView.InspectorView
Constructors
public InspectorOptions() #Methods
public static int DefaultDepthFor(int fieldCount, int narrowDepth = 3) #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 int
- The number of members the object shows.
- narrowDepth int = 3
- The depth for objects that are not wide (default 3).
Returns
int The depth.Inherited Methods
Properties
public int 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 bool 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; } #Fluent("UnwrapBy")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; } #Fluent("IdentityBy")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 int WideObjectFields #The member count above which an object counts as wide for InspectorOptions.DefaultDepthFor (12).
12Extension Methods
public static InspectorOptions Exclude(InspectorOptions inspectorOptions, string item) #Adds an item to InspectorOptions.Exclude: 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.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- item string
- The item.
public static InspectorOptions Exclude(InspectorOptions inspectorOptions, IEnumerable<string> items) #Adds items to InspectorOptions.Exclude: 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.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static InspectorOptions IdentityBy(InspectorOptions inspectorOptions, Func<object, object>? value) #Sets InspectorOptions.Identity: 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.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value System.Func<object, object>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { Identity = value }; inspectorOptions.IdentityBy(value);public static InspectorOptions Include(InspectorOptions inspectorOptions, string item) #Adds an item to InspectorOptions.Include: Optional member-name wildcard allow list.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- item string
- The item.
public static InspectorOptions Include(InspectorOptions inspectorOptions, IEnumerable<string> items) #Adds items to InspectorOptions.Include: Optional member-name wildcard allow list.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static InspectorOptions MaxColumns(InspectorOptions inspectorOptions, int value) #Sets InspectorOptions.MaxColumns: Maximum tabular columns exposed.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { MaxColumns = value }; inspectorOptions.MaxColumns(value);public static InspectorOptions MaxDepth(InspectorOptions inspectorOptions, int value) #Sets InspectorOptions.MaxDepth: Maximum node depth below the root.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { MaxDepth = value }; inspectorOptions.MaxDepth(value);public static InspectorOptions MaxItems(InspectorOptions inspectorOptions, int value) #Sets InspectorOptions.MaxItems: Maximum collection items listed.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { MaxItems = value }; inspectorOptions.MaxItems(value);public static InspectorOptions MaxNodes(InspectorOptions inspectorOptions, int value) #Sets InspectorOptions.MaxNodes: 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.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { MaxNodes = value }; inspectorOptions.MaxNodes(value);public static InspectorOptions Order(InspectorOptions inspectorOptions, string item) #Adds an item to InspectorOptions.Order: Member names to place first, in listed order.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- item string
- The item.
public static InspectorOptions Order(InspectorOptions inspectorOptions, IEnumerable<string> items) #Adds items to InspectorOptions.Order: Member names to place first, in listed order.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static InspectorOptions Source(InspectorOptions inspectorOptions, IMemberSource item) #Adds an item to InspectorOptions.Sources: Custom sources, consulted before built-in sources.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- item ConsoleMonster.Data.IMemberSource
- The item.
public static InspectorOptions Sources(InspectorOptions inspectorOptions, IEnumerable<IMemberSource> items) #Adds items to InspectorOptions.Sources: Custom sources, consulted before built-in sources.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Data.IMemberSource>
- The items, in order.
public static InspectorOptions TimeBudget(InspectorOptions inspectorOptions, TimeSpan value) #Sets InspectorOptions.TimeBudget: How long one inspection may spend reading values (default 2 seconds; zero or less for no limit).
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { TimeBudget = value }; inspectorOptions.TimeBudget(value);public static InspectorOptions UnwrapBy(InspectorOptions inspectorOptions, Func<object, object>? value) #Sets InspectorOptions.Unwrap: 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.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value System.Func<object, object>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { Unwrap = value }; inspectorOptions.UnwrapBy(value);public static InspectorOptions UseReflection(InspectorOptions inspectorOptions, bool value = true) #Sets InspectorOptions.UseReflection: Whether public-property reflection is used as the final built-in source.
Parameters
- inspectorOptions ConsoleMonster.Data.InspectorOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Data.InspectorOptions { UseReflection = value }; inspectorOptions.UseReflection(value);