Class SyntaxHighlightingTools
Syntax highlighting tools
Inheritance
Namespace
Syntax
public static class SyntaxHighlightingTools
Properties
HighlighterNames
All installed highlighter names
Property Value
Declaration
public static string[] HighlighterNames { get; }
Highlighters
All installed highlighters
Property Value
Declaration
public static SyntaxHighlighting[] Highlighters { get; }
Methods
Exists(string)
Checks to see if a highlighter exists or not
Returns
True if found; false otherwise.
Declaration
public static bool Exists(string highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | string | A specific highlighter to check |
ExistsBuiltin(string)
Checks to see if a highlighter is a built-in or not
Returns
True if found; false otherwise.
Declaration
public static bool ExistsBuiltin(string highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | string | A specific highlighter to check |
GetComponent(string)
Gets the default highlighter
Returns
Declaration
public static SyntaxHighlightingComponent GetComponent(string componentName)
Parameters
| Name | Type | Description |
|---|---|---|
| componentName | string | Component name |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetComponent(string, string)
Gets the default highlighter
Returns
Declaration
public static SyntaxHighlightingComponent GetComponent(string highlighter, string componentName)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | string | Highlighter name |
| componentName | string | Component name |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetComponent(SyntaxHighlighting?, string)
Gets the highlighter
Returns
Declaration
public static SyntaxHighlightingComponent GetComponent(SyntaxHighlighting? highlighter, string componentName)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | SyntaxHighlighting | Highlighter |
| componentName | string | Component name |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetHighlighter()
Gets the default highlighter for the current read. Returns null if no reader is present.
Returns
Declaration
public static SyntaxHighlighting? GetHighlighter()
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetHighlighter(string)
Gets the highlighter
Returns
Declaration
public static SyntaxHighlighting GetHighlighter(string highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | string | Highlighter name |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetHighlighterFromJson(string)
Gets a highlighter from its JSON representation
Returns
A highlighter info containing JSON representation
Declaration
public static SyntaxHighlighting? GetHighlighterFromJson(string json)
Parameters
| Name | Type | Description |
|---|---|---|
| json | string | Highlighter JSON contents |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetHighlighterToJson()
Gets a JSON representation of the highlighter
Returns
A string containing the JSON representation of a highlighter
Declaration
public static string GetHighlighterToJson()
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetHighlighterToJson(string)
Gets a JSON representation of the highlighter
Returns
A string containing the JSON representation of a highlighter
Declaration
public static string GetHighlighterToJson(string highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | string | Highlighter name to save to JSON |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
GetHighlighterToJson(SyntaxHighlighting?)
Gets a JSON representation of the highlighter
Returns
A string containing the JSON representation of a highlighter
Declaration
public static string GetHighlighterToJson(SyntaxHighlighting? highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | SyntaxHighlighting | Highlighter to save to JSON |
Exceptions
| Type | Condition |
|---|---|
| TerminauxException |
RegisterHighlighter(SyntaxHighlighting)
Registers a highlighter
Declaration
public static void RegisterHighlighter(SyntaxHighlighting highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | SyntaxHighlighting | Highlighter information |
UnregisterHighlighter(string)
Unregisters a highlighter
Declaration
public static void UnregisterHighlighter(string highlighter)
Parameters
| Name | Type | Description |
|---|---|---|
| highlighter | string | Highlighter information |