API Reference
ShapeBudget
The time and node allowance of one shaping pass. Getters that reach a remote system (directory entries, COM objects, lazy collections) can take seconds each; once the allowance is spent the remaining values are not read and show as "…" instead of stalling the output.
Inheritance
- Object
- ShapeBudget
Usage
Explore 7 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 1
- Method ShapeBudget.For
Accepted by parameters 6
- Method ValueShaper.Cell
- Method ValueShaper.Flatten
- Method ValueShaper.Read
- Method ValueShaper.Text
- Method ValueShaper.Title
- Method ValueShaper.TryGetField
Constructors
public ShapeBudget(TimeSpan time, Int32 maxNodes) #Creates a budget.
Parameters
- time System.TimeSpan
- How long the pass may take.
- maxNodes System.Int32
- How many values it may read.
Methods
public static ShapeBudget For(ShapeOptions? options) #ShapeBudgetA budget from options.
Parameters
- options ConsoleMonster.Values.ShapeOptions?
- The options, or null for the defaults.
Returns
The budget.
public Object? Guard(Object source, Func<Object?> read) #Object?Runs one read for a source (a column, a field), timing it. Reads slower than 200 ms count as stalls; once the stalls add up to the time allowance, only sources that have already read quickly are still read (the others give BudgetExceeded), so a large but healthy table is never cut short and remote getters cannot hold it up.
Parameters
- source System.Object
- What is read (a column or field identity).
- read System.Func<System.Object?>
- The read.
Returns
The value, or BudgetExceeded.Instance.
public Boolean TryTake() #BooleanCounts one read; returns false (and remembers it) when the allowance is spent.
Returns
True when the value may be read.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public Boolean WasExceeded { get; private set; } #Whether the pass stopped reading at some point.