API Reference
GuidanceBuilder
Fluent builder for rule guidance sections (summary, why it matters, how-to, references).
Inheritance
- Object
- GuidanceBuilder
Constructors
public GuidanceBuilder(Rule rule) #Creates a new GuidanceBuilder bound to the provided rule.
Parameters
- rule TestimoX.Definitions.Rule
Methods
public GuidanceBuilder AsMarkdown(Boolean markdown = true) #GuidanceBuilderSets markdown mode for all text sections.
Parameters
- markdown System.Boolean = true
- True to treat all guidance content as markdown.
Returns
The same builder.
public GuidanceBuilder Example(String title, String language, String code, String description = null) #GuidanceBuilderAdds a code example with optional description.
Parameters
- title System.String
- Short example title.
- language System.String
- Language id (e.g., "csharp", "powershell").
- code System.String
- Code sample to render.
- description System.String = null
- Optional description.
Returns
The same builder.
public GuidanceBuilder ExampleCSharp(String title, String code, String description = null) #GuidanceBuilderAdds a C# code example.
Parameters
- title System.String
- Example title.
- code System.String
- C# code sample.
- description System.String = null
- Optional description.
Returns
The same builder.
public GuidanceBuilder ExamplePowerShell(String title, String code, String description = null) #GuidanceBuilderAdds a PowerShell code example.
Parameters
- title System.String
- Example title.
- code System.String
- PowerShell code sample.
- description System.String = null
- Optional description.
Returns
The same builder.
public GuidanceBuilder FixAsMarkdown(Boolean markdown = true) #GuidanceBuilderMarks the "How to fix" section as markdown content.
Parameters
- markdown System.Boolean = true
- True to treat content as markdown.
Returns
The same builder.
public GuidanceBuilder HowToFix(params String[] items) #GuidanceBuilderAdds lines describing how to fix or mitigate findings.
Parameters
- items System.String[]
- Bullet lines or steps to remediate.
Returns
The same builder.
public GuidanceBuilder HowToInvestigate(params String[] items) #GuidanceBuilderAdds lines describing how to investigate findings produced by this rule.
Parameters
- items System.String[]
- Bullet lines or paragraphs.
Returns
The same builder.
public GuidanceBuilder InvestigateAsMarkdown(Boolean markdown = true) #GuidanceBuilderMarks the "How to investigate" section as markdown content.
Parameters
- markdown System.Boolean = true
- True to treat content as markdown.
Returns
The same builder.
public GuidanceBuilder Reference(String title, String url) #GuidanceBuilderAdds a single titled reference link.
Parameters
- title System.String
- Link title.
- url System.String
- Absolute URL.
Returns
The same builder.
public GuidanceBuilder References(params ValueTuple<String, String>[] items) #GuidanceBuilderAdds reference links or plain citations. Accepts either URLs or "Title | URL" strings.
Parameters
- items System.String[]
- URLs or "Title | URL" strings.
Returns
The same builder.
References(System.ValueTuple{System.String,System.String}[] items) #Adds multiple titled reference links.
Parameters
- items System.ValueTuple{System.String,System.String}[]
- Pairs of (Title, Url).
Returns
The same builder.
public GuidanceBuilder Summary(String text) #GuidanceBuilderShort summary describing what the rule checks and why it matters.
Parameters
- text System.String
- One‑line summary (markdown supported).
Returns
The same builder.
public GuidanceBuilder SummaryAsMarkdown(Boolean markdown = true) #GuidanceBuilderMarks the summary as markdown content.
Parameters
- markdown System.Boolean = true
- True to treat content as markdown.
Returns
The same builder.
public GuidanceBuilder WhyAsMarkdown(Boolean markdown = true) #GuidanceBuilderMarks the "Why it matters" section as markdown content.
Parameters
- markdown System.Boolean = true
- True to treat content as markdown.
Returns
The same builder.
public GuidanceBuilder WhyItMatters(String text) #GuidanceBuilderExplains the impact or risk addressed by the rule.
Parameters
- text System.String
- Why it matters text (markdown supported).
Returns
The same builder.