HighlightingOptions Pennington.Infrastructure
Options for code highlighting configuration.
Properties
HighlightersSystem.Collections.Generic.IReadOnlyList<Pennington.Highlighting.ICodeHighlighter>- Highlighters registered via
AddHighlighteror the generic overload.
Methods
AddHighlighter
#public void AddHighlighter(ICodeHighlighter highlighter);Registers a pre-built highlighter instance.
Parameters
highlighterICodeHighlighter
AddHighlighter<T>
#public void AddHighlighter<T>() where T : ICodeHighlighter, new();Registers a highlighter type, constructed with its parameterless constructor.
Pennington.Infrastructure.HighlightingOptions
namespace Pennington.Infrastructure;
/// Options for code highlighting configuration.
public class HighlightingOptions
{
/// Registers a pre-built highlighter instance.
public void AddHighlighter(ICodeHighlighter highlighter);
/// Registers a highlighter type, constructed with its parameterless constructor.
public void AddHighlighter<T>() where T : ICodeHighlighter, new();
/// Highlighters registered via AddHighlighter or the generic overload.
public IReadOnlyList<ICodeHighlighter> Highlighters => _highlighters;
}