示例#1
0
        public void Remove(VisualMarker marker)
        {
            if (marker == null)
            {
                throw new ArgumentNullException(nameof(marker));
            }

            this.markers.Remove(marker);
        }
示例#2
0
        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);
        }