InspectorView
ConsoleMonster.Widgets
Shows an arbitrary object (POCO, dictionary, PSObject through a member source, JSON on .NET 8) as a record view: scalar members as labelled values through the automatic presenter, nested objects as indented sections, uniform collections as nested tables (columns inferred from the elements), other collections as lists, with +N more, cycle and depth-limit notes. The object is inspected once, when the view is created.
Inheritance
- object
- InspectorView
Usage
Explore 8 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 4
- Extension method InspectorView.Presentation
- Extension method InspectorView.ShowHeader
- Method InspectorViewFluent.Presentation
- Method InspectorViewFluent.ShowHeader
Accepted by parameters 4
- Extension method InspectorView.Presentation
- Extension method InspectorView.ShowHeader
- Method InspectorViewFluent.Presentation
- Method InspectorViewFluent.ShowHeader
Constructors
public InspectorView(object? value, InspectorOptions? options = null, string? title = null) #Inspects a value and creates the view.
Parameters
- value object?
- The value.
- options ConsoleMonster.Data.InspectorOptions? = null
- Depth, item and column limits, filters and member sources, or null for defaults.
- title string? = null
- The title, or null for the value's type name.
public InspectorView(InspectNode root, string? title = null) #Creates the view from an inspection tree.
Parameters
- root ConsoleMonster.Data.InspectNode
- The inspection root.
- title string? = null
- The title, or null for the root's type name.
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
Extension Methods
public static InspectorView Presentation(InspectorView inspectorView, PresentationOptions value) #Sets InspectorView.Presentation: Culture, clock and time zone for values.
Parameters
- inspectorView ConsoleMonster.Widgets.InspectorView
- The instance.
- value ConsoleMonster.Presenters.PresentationOptions
- The value.
Examples
// C# initializer or property // C# fluent
inspectorView.Presentation = value; inspectorView.Presentation(value);public static InspectorView Presentation(InspectorView inspectorView, Action<PresentationOptions> configure) #Configures InspectorView.Presentation in place (creating it when not set): Culture, clock and time zone for values.
Parameters
- inspectorView ConsoleMonster.Widgets.InspectorView
- The instance.
- configure System.Action<ConsoleMonster.Presenters.PresentationOptions>
- Configures the value.
public static InspectorView ShowHeader(InspectorView inspectorView, bool value = true) #Sets InspectorView.ShowHeader: Whether the title and summary line is shown (default true; nested inspectors turn it off).
Parameters
- inspectorView ConsoleMonster.Widgets.InspectorView
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
inspectorView.ShowHeader = value; inspectorView.ShowHeader(value);