/// <summary> /// Creates a new DocumentHighlighter instance. /// </summary> public DocumentHighlighter(TextDocument document, HighlightingRuleSet baseRuleSet) { if (document == null) throw new ArgumentNullException("document"); if (baseRuleSet == null) throw new ArgumentNullException("baseRuleSet"); this.document = document; this.baseRuleSet = baseRuleSet; WeakLineTracker.Register(document, this); InvalidateHighlighting(); }
public HighlightingColorizer(TextView textView, HighlightingRuleSet ruleSet) : this(ruleSet) { }
/// <summary> /// Creates a new HighlightingColorizer instance. /// </summary> /// <param name="ruleSet">The root highlighting rule set.</param> public HighlightingColorizer(HighlightingRuleSet ruleSet) { if (ruleSet == null) throw new ArgumentNullException("ruleSet"); this.ruleSet = ruleSet; }
public TextViewDocumentHighlighter(HighlightingColorizer colorizer, TextView textView, TextDocument document, HighlightingRuleSet baseRuleSet) : base(document, baseRuleSet) { Debug.Assert(colorizer != null); Debug.Assert(textView != null); this.colorizer = colorizer; this.textView = textView; }