public SonarIssueTextViewMargin(IEnumerable<SonarIssue> sonarIssues, IWpfTextViewHost textViewHost,
            IWpfTextViewMargin containerMargin, IScrollMapFactoryService scrollMapFactoryService)
        {
            _sonarIssues = sonarIssues;

            Width = textViewHost
                .TextView
                .Options
                .GetOptionValue(DefaultTextViewHostOptions.ChangeTrackingMarginWidthOptionId);

            _scrollBar = new SimpleScrollBar(textViewHost, containerMargin, this, scrollMapFactoryService);

            _scrollBarOnTrackSpanChanged = (sender, args) => DrawMargins();
            _scrollBar.TrackSpanChanged += _scrollBarOnTrackSpanChanged;
        }
 public void Dispose()
 {
     _scrollBar.TrackSpanChanged -= _scrollBarOnTrackSpanChanged;
     _scrollBar = null;
 }