AvalonStudio.TextEditor.Document.WeakLineTracker.Register C# (CSharp) Method

Register() public static method

Registers the targetTracker as line tracker for the textDocument. A weak reference to the target tracker will be used, and the WeakLineTracker will deregister itself when the target tracker is garbage collected.
public static Register ( TextDocument textDocument, ILineTracker targetTracker ) : WeakLineTracker
textDocument TextDocument
targetTracker ILineTracker
return WeakLineTracker
		public static WeakLineTracker Register(TextDocument textDocument, ILineTracker targetTracker)
		{
			if (textDocument == null)
				throw new ArgumentNullException("textDocument");
			if (targetTracker == null)
				throw new ArgumentNullException("targetTracker");
			var wlt = new WeakLineTracker(textDocument, targetTracker);
			textDocument.LineTrackers.Add(wlt);
			return wlt;
		}