SizeBudgetFile
Namespace: Dotsider.Core.Analysis
Assembly: Dotsider.Core.dll
Reads a size-budget document: { "budgets": [ ... ] } where each entry is either a
spec string in the SizeBudgetParser grammar or an object
{ "name", "description", "scope", "max", "growth", "severity", "topN" } — the object
form is how a team names its budgets, downgrades one to a warning, or pins a per-budget
contributor count. Both forms mix freely in one document. The CLI’s --budget-file
and the MCP server’s inline budget JSON share this one parser.
public static class SizeBudgetFileInheritance
Section titled “Inheritance”Object → SizeBudgetFile
Methods
Section titled “Methods”Load(string)
Section titled “Load(string)”Loads a budget document from a file.
Parameters:
path(String): The path of the JSON document.
Returns: IReadOnlyList<SizeBudget>
The parsed budgets, in document order.
Exceptions:
- FormatException: The document is not valid JSON or an entry is malformed.
- IOException: The file cannot be read.
public static IReadOnlyList<SizeBudget> Load(string path)Parse(string)
Section titled “Parse(string)”Parses a budget document from its JSON text.
Parameters:
json(String): The document text.
Returns: IReadOnlyList<SizeBudget>
The parsed budgets, in document order.
Exceptions:
- FormatException: The document is not valid JSON or an entry is malformed.
public static IReadOnlyList<SizeBudget> Parse(string json)