API Reference
ChangeView
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.WithLongValue
- Extension method ChangeView.WithMaxProperties
- Extension method ChangeView.WithMode
- Extension method ChangeView.WithMoreHint
- Extension method ChangeView.WithTitle
- Method ChangeViewFluent.WithLongValue
- Method ChangeViewFluent.WithMaxProperties
- Method ChangeViewFluent.WithMode
- Method ChangeViewFluent.WithMoreHint
- Method ChangeViewFluent.WithTitle
Accepted by parameters 10
- Extension method ChangeView.WithLongValue
- Extension method ChangeView.WithMaxProperties
- Extension method ChangeView.WithMode
- Extension method ChangeView.WithMoreHint
- Extension method ChangeView.WithTitle
- Method ChangeViewFluent.WithLongValue
- Method ChangeViewFluent.WithMaxProperties
- Method ChangeViewFluent.WithMode
- Method ChangeViewFluent.WithMoreHint
- Method ChangeViewFluent.WithTitle
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) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public Void Render(Region region, RenderContext context) #VoidRenders 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) #IReadOnlyList<DiffLine>A line diff of two texts (longest common subsequence over lines).
Parameters
- before System.String?
- The old text.
- after System.String?
- The new text.
Returns
The lines in order.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public Int32 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 Int32 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 WithLongValue(ChangeView changeView, Int32 value) #ChangeViewSets 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 System.Int32
- The value.
Returns
The same instance.
public static ChangeView WithMaxProperties(ChangeView changeView, Int32 value) #ChangeViewSets 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 System.Int32
- The value.
Returns
The same instance.
public static ChangeView WithMode(ChangeView changeView, ChangeViewMode value) #ChangeViewSets ChangeView.Mode: The view.
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value ConsoleMonster.Changes.ChangeViewMode
- The value.
Returns
The same instance.
public static ChangeView WithMoreHint(ChangeView changeView, String? value) #ChangeViewSets 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 System.String?
- The value.
Returns
The same instance.
public static ChangeView WithTitle(ChangeView changeView, String? value) #ChangeViewSets ChangeView.Title: A title above the view (markup), or null.
Parameters
- changeView ConsoleMonster.Changes.ChangeView
- The instance.
- value System.String?
- The value.
Returns
The same instance.