ShapeOptions
ConsoleMonster.Values
Options for ValueShaper: how records are read and how values become text.
Inheritance
- object
- ShapeOptions
Usage
Explore 72 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 28
- Extension method ShapeOptions.Collections
- Extension method ShapeOptions.Culture
- Extension method ShapeOptions.IdentityBy
- Extension method ShapeOptions.ItemLimit
- Extension method ShapeOptions.MaxFields
- Extension method ShapeOptions.MaxNodes
- Extension method ShapeOptions.Separator
- Extension method ShapeOptions.Source
- Extension method ShapeOptions.Sources
- Extension method ShapeOptions.TimeBudget
- Extension method ShapeOptions.TypeNamesBy
- Extension method ShapeOptions.UnwrapBy
- Extension method ShapeOptions.UseReflection
- Method ShapeOptions.Clone
- Method ShapeOptionsFluent.Collections
- Method ShapeOptionsFluent.Culture
- Method ShapeOptionsFluent.IdentityBy
- Method ShapeOptionsFluent.ItemLimit
- Method ShapeOptionsFluent.MaxFields
- Method ShapeOptionsFluent.MaxNodes
- Method ShapeOptionsFluent.Separator
- Method ShapeOptionsFluent.Source
- Method ShapeOptionsFluent.Sources
- Method ShapeOptionsFluent.TimeBudget
- Method ShapeOptionsFluent.TypeNamesBy
- Method ShapeOptionsFluent.UnwrapBy
- Method ShapeOptionsFluent.UseReflection
- Property ConsoleViewOptions.Shape
Accepted by parameters 44
- Method ShapeBudget.For
- Extension method ShapeOptions.Collections
- Extension method ShapeOptions.Culture
- Extension method ShapeOptions.IdentityBy
- Extension method ShapeOptions.ItemLimit
- Extension method ShapeOptions.MaxFields
- Extension method ShapeOptions.MaxNodes
- Extension method ShapeOptions.Separator
- Extension method ShapeOptions.Source
- Extension method ShapeOptions.Sources
- Extension method ShapeOptions.TimeBudget
- Extension method ShapeOptions.TypeNamesBy
- Extension method ShapeOptions.UnwrapBy
- Extension method ShapeOptions.UseReflection
- Method ShapeOptionsFluent.Collections
- Method ShapeOptionsFluent.Culture
- Method ShapeOptionsFluent.IdentityBy
- Method ShapeOptionsFluent.ItemLimit
- Method ShapeOptionsFluent.MaxFields
- Method ShapeOptionsFluent.MaxNodes
- Method ShapeOptionsFluent.Separator
- Method ShapeOptionsFluent.Source
- Method ShapeOptionsFluent.Sources
- Method ShapeOptionsFluent.TimeBudget
- Method ShapeOptionsFluent.TypeNamesBy
- Method ShapeOptionsFluent.UnwrapBy
- Method ShapeOptionsFluent.UseReflection
- Method ValueJson.Serialize
- Method ValueShaper.Cell
- Method ValueShaper.Fields
- Method ValueShaper.FindAdapter
- Method ValueShaper.Flatten
- Method ValueShaper.Prepare
- Method ValueShaper.ScalarText
- Method ValueShaper.ShapeOf
- Method ValueShaper.Text
- Method ValueShaper.Title
- Method ValueShaper.TryGetField
- Method ValueShaper.TypeName
- Extension method ConsoleViewOptions.Shape
- Extension method ConsoleViewOptions.Shape
- Method ConsoleViewOptionsFluent.Shape
- Method ConsoleViewOptionsFluent.Shape
- Method LiveTable.Add
Constructors
public ShapeOptions() #Methods
public ShapeOptions Clone() #A copy with the same adapters, delegates and limits.
Inherited Methods
Properties
public IList<IMemberSource> Sources { get; } #Record adapters tried before the built-in ones (for example PowerShell objects).
public Func<object, object>? Unwrap { get; set; } #Fluent("UnwrapBy")Turns a wrapper into the value it wraps (for example a PowerShell object into its base object), or null.
public Func<object, object>? Identity { get; set; } #Fluent("IdentityBy")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 Func<object, IEnumerable<string>>? TypeNames { get; set; } #Fluent("TypeNamesBy")Extra type names for a value (for example PowerShell type names), used to find registered shapers, or null.
public CollectionDisplay Collections { get; set; } #How collections are written inside cells and titles (default CollectionDisplay.Join).
public string Separator { get; set; } #The separator for CollectionDisplay.Join and CollectionDisplay.FirstN (default ", ").
public int ItemLimit { get; set; } #How many items a collection shows before the "+N" marker (default 5).
public CultureInfo? Culture { get; set; } #The culture for numbers and dates, or null for the current culture.
public bool UseReflection { get; set; } #Whether plain .NET objects may be read through reflection (default true). Callers using trimming must preserve those public members, or set this to false and supply explicit adapters or shapers. Adapter-only mode does not make arbitrary caller delegates or adapters trim-safe.
public int MaxFields { get; set; } #The most fields a record contributes as default columns (default 12).
public TimeSpan TimeBudget { get; set; } #How long one shaping pass (a table, a list, a tree) may spend reading values (default 2 seconds).
public int MaxNodes { get; set; } #How many values one shaping pass may read (default 20 000).
public CultureInfo ResolvedCulture { get; } #The culture to format with: ShapeOptions.Culture or the current culture.
Extension Methods
public static ShapeOptions Collections(ShapeOptions shapeOptions, CollectionDisplay value) #Sets ShapeOptions.Collections: How collections are written inside cells and titles (default CollectionDisplay.Join).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value ConsoleMonster.Values.CollectionDisplay
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { Collections = value }; shapeOptions.Collections(value);public static ShapeOptions Culture(ShapeOptions shapeOptions, CultureInfo? value) #Sets ShapeOptions.Culture: The culture for numbers and dates, or null for the current culture.
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value System.Globalization.CultureInfo?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { Culture = value }; shapeOptions.Culture(value);public static ShapeOptions IdentityBy(ShapeOptions shapeOptions, Func<object, object>? value) #Sets ShapeOptions.Identity: 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
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value System.Func<object, object>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { Identity = value }; shapeOptions.IdentityBy(value);public static ShapeOptions ItemLimit(ShapeOptions shapeOptions, int value) #Sets ShapeOptions.ItemLimit: How many items a collection shows before the "+N" marker (default 5).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { ItemLimit = value }; shapeOptions.ItemLimit(value);public static ShapeOptions MaxFields(ShapeOptions shapeOptions, int value) #Sets ShapeOptions.MaxFields: The most fields a record contributes as default columns (default 12).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { MaxFields = value }; shapeOptions.MaxFields(value);public static ShapeOptions MaxNodes(ShapeOptions shapeOptions, int value) #Sets ShapeOptions.MaxNodes: How many values one shaping pass may read (default 20 000).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { MaxNodes = value }; shapeOptions.MaxNodes(value);public static ShapeOptions Separator(ShapeOptions shapeOptions, string value) #Sets ShapeOptions.Separator: The separator for CollectionDisplay.Join and CollectionDisplay.FirstN (default ", ").
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { Separator = value }; shapeOptions.Separator(value);public static ShapeOptions Source(ShapeOptions shapeOptions, IMemberSource item) #Adds an item to ShapeOptions.Sources: Record adapters tried before the built-in ones (for example PowerShell objects).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- item ConsoleMonster.Data.IMemberSource
- The item.
public static ShapeOptions Sources(ShapeOptions shapeOptions, IEnumerable<IMemberSource> items) #Adds items to ShapeOptions.Sources: Record adapters tried before the built-in ones (for example PowerShell objects).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Data.IMemberSource>
- The items, in order.
public static ShapeOptions TimeBudget(ShapeOptions shapeOptions, TimeSpan value) #Sets ShapeOptions.TimeBudget: How long one shaping pass (a table, a list, a tree) may spend reading values (default 2 seconds).
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { TimeBudget = value }; shapeOptions.TimeBudget(value);public static ShapeOptions TypeNamesBy(ShapeOptions shapeOptions, Func<object, IEnumerable<string>>? value) #Sets ShapeOptions.TypeNames: Extra type names for a value (for example PowerShell type names), used to find registered shapers, or null.
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value System.Func<object, System.Collections.Generic.IEnumerable<string>>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { TypeNames = value }; shapeOptions.TypeNamesBy(value);public static ShapeOptions UnwrapBy(ShapeOptions shapeOptions, Func<object, object>? value) #Sets ShapeOptions.Unwrap: Turns a wrapper into the value it wraps (for example a PowerShell object into its base object), or null.
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value System.Func<object, object>?
- The callback.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { Unwrap = value }; shapeOptions.UnwrapBy(value);public static ShapeOptions UseReflection(ShapeOptions shapeOptions, bool value = true) #Sets ShapeOptions.UseReflection: Whether plain .NET objects may be read through reflection (default true). Callers using trimming must preserve those public members, or set this to false and supply explicit adapters or shapers. Adapter-only mode does not make arbitrary caller delegates or adapters trim-safe.
Parameters
- shapeOptions ConsoleMonster.Values.ShapeOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Values.ShapeOptions { UseReflection = value }; shapeOptions.UseReflection(value);