コード例 #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();
 }
コード例 #4
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);
     InvalidateSpanStacks();
 }