This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

HighlightingOptions Pennington.Infrastructure

Options for code highlighting configuration.

Properties

Highlighters System.Collections.Generic.IReadOnlyList<Pennington.Highlighting.ICodeHighlighter>
Highlighters registered via AddHighlighter or the generic overload.

Methods

AddHighlighter

#
public void AddHighlighter(ICodeHighlighter highlighter);

Registers a pre-built highlighter instance.

Parameters

highlighter ICodeHighlighter

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;
}