DiffOptions
ConsoleMonster.Changes
Options for ObjectDiff.
Inheritance
- object
- DiffOptions
Usage
Explore 55 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 26
- Extension method DiffOptions.Baseline
- Extension method DiffOptions.CaseSensitive
- Extension method DiffOptions.Depth
- Extension method DiffOptions.Ignore
- Extension method DiffOptions.IncludeUnchanged
- Extension method DiffOptions.Key
- Extension method DiffOptions.KeyBy
- Extension method DiffOptions.Properties
- Extension method DiffOptions.Property
- Extension method DiffOptions.Source
- Extension method DiffOptions.Sources
- Extension method DiffOptions.TimeBudget
- Extension method DiffOptions.UnwrapBy
- Method DiffOptionsFluent.Baseline
- Method DiffOptionsFluent.CaseSensitive
- Method DiffOptionsFluent.Depth
- Method DiffOptionsFluent.Ignore
- Method DiffOptionsFluent.IncludeUnchanged
- Method DiffOptionsFluent.Key
- Method DiffOptionsFluent.KeyBy
- Method DiffOptionsFluent.Properties
- Method DiffOptionsFluent.Property
- Method DiffOptionsFluent.Source
- Method DiffOptionsFluent.Sources
- Method DiffOptionsFluent.TimeBudget
- Method DiffOptionsFluent.UnwrapBy
Accepted by parameters 29
- Extension method DiffOptions.Baseline
- Extension method DiffOptions.CaseSensitive
- Extension method DiffOptions.Depth
- Extension method DiffOptions.Ignore
- Extension method DiffOptions.IncludeUnchanged
- Extension method DiffOptions.Key
- Extension method DiffOptions.KeyBy
- Extension method DiffOptions.Properties
- Extension method DiffOptions.Property
- Extension method DiffOptions.Source
- Extension method DiffOptions.Sources
- Extension method DiffOptions.TimeBudget
- Extension method DiffOptions.UnwrapBy
- Method DiffOptionsFluent.Baseline
- Method DiffOptionsFluent.CaseSensitive
- Method DiffOptionsFluent.Depth
- Method DiffOptionsFluent.Ignore
- Method DiffOptionsFluent.IncludeUnchanged
- Method DiffOptionsFluent.Key
- Method DiffOptionsFluent.KeyBy
- Method DiffOptionsFluent.Properties
- Method DiffOptionsFluent.Property
- Method DiffOptionsFluent.Source
- Method DiffOptionsFluent.Sources
- Method DiffOptionsFluent.TimeBudget
- Method DiffOptionsFluent.UnwrapBy
- Method ObjectDiff.Compare
- Method ObjectDiff.CompareBaseline
- Method ObjectDiff.CompareObjects
Constructors
public DiffOptions() #Inherited Methods
Properties
public IList<string> Key { get; } #The members whose values identify an object (like Compare-Object -Property for matching). Empty: Id, Name, Key...
public Func<object, object?>? KeySelector { get; set; } #Fluent("KeyBy")A function that returns an object's key, instead of DiffOptions.Key.
public IList<string> Properties { get; } #The members to compare, or empty for all of them.
public IList<string> Ignore { get; } #Members (or paths such as Address.City, with * wildcards) left out of the comparison.
public bool IncludeUnchanged { get; set; } #Whether unchanged objects are listed too (they are always counted).
public Func<object, object>? Unwrap { get; set; } #Fluent("UnwrapBy")Turns a host wrapper into the value to compare (for example a PowerShell object around a dictionary), or null.
public TimeSpan TimeBudget { get; set; } #How long getters may stall in one comparison before slow members stop being read (default 2 seconds).
public bool CaseSensitive { get; set; } #Compare string values and match keys with ordinal case sensitivity. Default false.
public object? Baseline { get; set; } #The baseline column's zero-based int index or unique string name. Null selects the first column; numeric strings remain names.
public IDictionary<string, Func<object?, object?>> Normalize { get; } #Comparison-only transforms keyed by exact property path (case-insensitive lookup). Display keeps original values.
public IList<IMemberSource> Sources { get; } #Member sources tried before reflection (PowerShell objects, dictionaries, JSON).
Extension Methods
public static DiffOptions Baseline(DiffOptions diffOptions, object? value) #Sets DiffOptions.Baseline: The baseline column's zero-based int index or unique string name. Null selects the first column; numeric strings remain names.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { Baseline = value }; diffOptions.Baseline(value);public static DiffOptions CaseSensitive(DiffOptions diffOptions, bool value = true) #Sets DiffOptions.CaseSensitive: Compare string values and match keys with ordinal case sensitivity. Default false.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { CaseSensitive = value }; diffOptions.CaseSensitive(value);public static DiffOptions Depth(DiffOptions diffOptions, int value) #Sets DiffOptions.Depth: How deep nested objects are compared (default 3).
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { Depth = value }; diffOptions.Depth(value);public static DiffOptions Ignore(DiffOptions diffOptions, string item) #Adds an item to DiffOptions.Ignore: Members (or paths such as Address.City, with * wildcards) left out of the comparison.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- item string
- The item.
public static DiffOptions Ignore(DiffOptions diffOptions, IEnumerable<string> items) #Adds items to DiffOptions.Ignore: Members (or paths such as Address.City, with * wildcards) left out of the comparison.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static DiffOptions IncludeUnchanged(DiffOptions diffOptions, bool value = true) #Sets DiffOptions.IncludeUnchanged: Whether unchanged objects are listed too (they are always counted).
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { IncludeUnchanged = value }; diffOptions.IncludeUnchanged(value);public static DiffOptions Key(DiffOptions diffOptions, string item) #Adds an item to DiffOptions.Key: The members whose values identify an object (like Compare-Object -Property for matching). Empty: Id, Name, Key...
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- item string
- The item.
public static DiffOptions Key(DiffOptions diffOptions, IEnumerable<string> items) #Adds items to DiffOptions.Key: The members whose values identify an object (like Compare-Object -Property for matching). Empty: Id, Name, Key...
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static DiffOptions KeyBy(DiffOptions diffOptions, Func<object, object?>? value) #Sets DiffOptions.KeySelector: A function that returns an object's key, instead of DiffOptions.Key.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value System.Func<object, object?>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { KeySelector = value }; diffOptions.KeyBy(value);public static DiffOptions Properties(DiffOptions diffOptions, IEnumerable<string> items) #Adds items to DiffOptions.Properties: The members to compare, or empty for all of them.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static DiffOptions Property(DiffOptions diffOptions, string item) #Adds an item to DiffOptions.Properties: The members to compare, or empty for all of them.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- item string
- The item.
public static DiffOptions Source(DiffOptions diffOptions, IMemberSource item) #Adds an item to DiffOptions.Sources: Member sources tried before reflection (PowerShell objects, dictionaries, JSON).
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- item ConsoleMonster.Data.IMemberSource
- The item.
public static DiffOptions Sources(DiffOptions diffOptions, IEnumerable<IMemberSource> items) #Adds items to DiffOptions.Sources: Member sources tried before reflection (PowerShell objects, dictionaries, JSON).
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Data.IMemberSource>
- The items, in order.
public static DiffOptions TimeBudget(DiffOptions diffOptions, TimeSpan value) #Sets DiffOptions.TimeBudget: How long getters may stall in one comparison before slow members stop being read (default 2 seconds).
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { TimeBudget = value }; diffOptions.TimeBudget(value);public static DiffOptions UnwrapBy(DiffOptions diffOptions, Func<object, object>? value) #Sets DiffOptions.Unwrap: Turns a host wrapper into the value to compare (for example a PowerShell object around a dictionary), or null.
Parameters
- diffOptions ConsoleMonster.Changes.DiffOptions
- The instance.
- value System.Func<object, object>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Changes.DiffOptions { Unwrap = value }; diffOptions.UnwrapBy(value);