예제 #1
0
		/// <summary>
		/// Creates a new DocumentHighlighter instance.
		/// </summary>
		public DocumentHighlighter(ReadOnlyDocument document, IHighlightingDefinition definition)
		{
			if (document == null)
				throw new ArgumentNullException("document");
			if (definition == null)
				throw new ArgumentNullException("definition");
			this.document = document;
			this.definition = definition;
			this.engine = new HighlightingEngine(definition.MainRuleSet);
			InvalidateHighlighting();
		}
예제 #2
0
		/// <summary>
		/// Creates a new DocumentHighlighter instance.
		/// </summary>
		public DocumentHighlighter(TextDocument document, IHighlightingDefinition definition)
		{
			if (document == null)
				throw new ArgumentNullException("document");
			if (definition == null)
				throw new ArgumentNullException("definition");
			this.document = document;
			this.definition = definition;
			this.engine = new HighlightingEngine(definition.MainRuleSet);
			document.VerifyAccess();
			weakLineTracker = WeakLineTracker.Register(document, this);
			InvalidateHighlighting();
		}
예제 #3
0
 /// <summary>
 /// Creates a new DocumentHighlighter instance.
 /// </summary>
 public DocumentHighlighter(ReadOnlyDocument document, IHighlightingDefinition definition)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
     if (definition == null)
     {
         throw new ArgumentNullException("definition");
     }
     this.document   = document;
     this.definition = definition;
     this.engine     = new HighlightingEngine(definition.MainRuleSet);
     InvalidateHighlighting();
 }
 /// <summary>
 /// Creates a new DocumentHighlighter instance.
 /// </summary>
 public DocumentHighlighter(TextDocument document, IHighlightingDefinition definition)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
     if (definition == null)
     {
         throw new ArgumentNullException("definition");
     }
     this.document   = document;
     this.definition = definition;
     this.engine     = new HighlightingEngine(definition.MainRuleSet);
     document.VerifyAccess();
     weakLineTracker = WeakLineTracker.Register(document, this);
     InvalidateSpanStacks();
 }