Table of Contents

Class ScriptBpa

Inheritance
ScriptBpa
Inherited Members
Namespace
TabularEditor.Shared.Scripting
Assembly
TabularEditor3.Shared.dll

Script-accessible Best Practice Analyzer helper. Exposed as ScriptHost.Bpa. Delegates are wired by the host (CLI or TE3 UI) at startup.

public class ScriptBpa
Extension Methods

Constructors

ScriptBpa()

public ScriptBpa()

Properties

AnalyzeDelegate

Delegate that runs BPA analysis and returns results. Signature: (tableFilter) -> BpaAnalysisResult.

public static Func<string[], BpaAnalysisResult> AnalyzeDelegate { get; set; }

Property Value

Type Description
Func<string[], BpaAnalysisResult>

Rules

Get the current set of BPA rules (built-in + model-embedded, deduplicated).

public IReadOnlyList<BestPracticeRule> Rules { get; }

Property Value

Type Description
IReadOnlyList<BestPracticeRule>

RulesDelegate

Delegate that returns the current set of BPA rules (built-in + model).

public static Func<IReadOnlyList<BestPracticeRule>> RulesDelegate { get; set; }

Property Value

Type Description
Func<IReadOnlyList<BestPracticeRule>>

Methods

Analyze(params string[])

Run BPA analysis on the current model. Optionally filter to specific tables.

public BpaAnalysisResult Analyze(params string[] tableFilter)

Parameters

Type Name Description
string[] tableFilter

Returns

Type Description
BpaAnalysisResult

ExportCsv(BpaAnalysisResult, string)

Export BPA analysis results to a CSV file at the specified path.

public void ExportCsv(BpaAnalysisResult results, string filePath)

Parameters

Type Name Description
BpaAnalysisResult results
string filePath