public void OnEvent(DocumentViewerEventArgs e)
 {
     if (e.EventType == DocumentViewerEvent.Added)
     {
         documentViewerToolTipServiceProvider.GetService(e.DocumentViewer);
     }
 }
        public IQuickInfoSource TryCreateQuickInfoSource(ITextBuffer textBuffer)
        {
            var docViewer = textBuffer.TryGetDocumentViewer();

            if (docViewer == null)
            {
                return(null);
            }
            return(new DocumentViewerToolTipServiceQuickInfoSource(documentViewerToolTipServiceProvider.GetService(docViewer)));
        }
 DocumentViewerToolTipService TryGetInstance()
 {
     if (__documentViewerToolTipService == null)
     {
         var docViewer = textView.TextBuffer.TryGetDocumentViewer();
         if (docViewer != null)
         {
             __documentViewerToolTipService = documentViewerToolTipServiceProvider.GetService(docViewer);
         }
     }
     return(__documentViewerToolTipService);
 }