public CodeColorizerBase(StyleDictionary Styles, ILanguageParser languageParser) { this.languageParser = languageParser ?? new LanguageParser(new LanguageCompiler(Languages.CompiledLanguages), Languages.LanguageRepository); this.Styles = Styles ?? StyleDictionary.DefaultLight; }
/// <summary> /// Creates a <see cref="HtmlClassFormatter"/>, for creating HTML to display Syntax Highlighted code, with Styles applied via CSS. /// </summary> /// <param name="Style">The Custom styles to Apply to the formatted Code.</param> /// <param name="languageParser">The language parser that the <see cref="HtmlClassFormatter"/> instance will use for its lifetime.</param> public HtmlClassFormatter(StyleDictionary Style = null, ILanguageParser languageParser = null) : base(Style, languageParser) { }
/// <summary> /// Creates a <see cref="RichTextBlockFormatter"/>, for rendering Syntax Highlighted code to a RichTextBlock. /// </summary> /// <param name="Style">The Custom styles to Apply to the formatted Code.</param> /// <param name="languageParser">The language parser that the <see cref="RichTextBlockFormatter"/> instance will use for its lifetime.</param> public RichTextBlockFormatter(StyleDictionary Style = null, ILanguageParser languageParser = null) : base(Style, languageParser) { }