public void Remove(VisualMarker marker) { if (marker == null) { throw new ArgumentNullException(nameof(marker)); } this.markers.Remove(marker); }
public VisualMarker TryAdd(int start, int length) { var textLength = this.editor.Document.TextLength; if (start < 0 || length > textLength) { return(null); } if (length < 0 || start + length > textLength) { return(null); } var marker = new VisualMarker(this, start, length); this.markers.Add(marker); return(marker); }