ChangeView
ConsoleMonster.Changes
Shows a ChangeSet in the design-system tones: added in the pass colour (+), removed in the fail colour (-), changed in the warning colour (~).
Inheritance
- object
- ChangeView
Usage
Explore 20 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 10
- Extension method ChangeView.LongValue
- Extension method ChangeView.MaxProperties
- Extension method ChangeView.Mode
- Extension method ChangeView.MoreHint
- Extension method ChangeView.Title
- Method ChangeViewFluent.LongValue
- Method ChangeViewFluent.MaxProperties
- Method ChangeViewFluent.Mode
- Method ChangeViewFluent.MoreHint
- Method ChangeViewFluent.Title
Accepted by parameters 10
- Extension method ChangeView.LongValue
- Extension method ChangeView.MaxProperties
- Extension method ChangeView.Mode
- Extension method ChangeView.MoreHint
- Extension method ChangeView.Title
- Method ChangeViewFluent.LongValue
- Method ChangeViewFluent.MaxProperties
- Method ChangeViewFluent.Mode
- Method ChangeViewFluent.MoreHint
- Method ChangeViewFluent.Title
Constructors
public ChangeView(ChangeSet changes, ChangeViewMode mode = Full) #Creates a change view.
Parameters
- changes ConsoleMonster.Changes.ChangeSet
- The changes.
- mode ConsoleMonster.Changes.ChangeViewMode = Full
- The view.
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.
public static IReadOnlyList<DiffLine> TextDiff(string? before, string? after) #A line diff using the shared bounded, linear-space engine; object previews ignore final-newline differences.
Parameters
- before string?
- The old text.
- after string?
- The new text.
Inherited Methods
Properties
public int LongValue { get; set; } #Values longer than this many cells (or with line breaks) show as a line diff instead of in the table (default 60).
public int MaxProperties { get; set; } #The most lines an added or removed object takes in the table, one per compared property (default 6, 0 for no limit); beyond it the last line says "+N more" with ChangeView.MoreHint. The side-by-side view lists all.
public string? MoreHint { get; set; } #Plain text after "+N more" saying where to see every value (Show-ConsoleChanges: "-PassThru or -View SideBySide"), or null.
Extension Methods
public static ChangeView LongValue(ChangeView changeView, int value) #Sets ChangeView.LongValue: Values longer than this many cells (or with line breaks) show as a line diff instead of in the table (default 60).
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
changeView.LongValue = value; changeView.LongValue(value);public static ChangeView MaxProperties(ChangeView changeView, int value) #Sets ChangeView.MaxProperties: The most lines an added or removed object takes in the table, one per compared property (default 6, 0 for no limit); beyond it the last line says "+N more" with ChangeView.MoreHint. The side-by-side view lists all.
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
changeView.MaxProperties = value; changeView.MaxProperties(value);public static ChangeView Mode(ChangeView changeView, ChangeViewMode value) #Sets ChangeView.Mode: The view.
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value ConsoleMonster.Changes.ChangeViewMode
- The value.
Examples
// C# initializer or property // C# fluent
changeView.Mode = value; changeView.Mode(value);public static ChangeView MoreHint(ChangeView changeView, string? value) #Sets ChangeView.MoreHint: Plain text after "+N more" saying where to see every value (Show-ConsoleChanges: "-PassThru or -View SideBySide"), or null.
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
changeView.MoreHint = value; changeView.MoreHint(value);public static ChangeView Title(ChangeView changeView, string? value) #Sets ChangeView.Title: A title above the view (markup), or null.
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
changeView.Title = value; changeView.Title(value);