public DocumentTabUIContext? Create<T>() where T : class { if (typeof(T) == typeof(IDocumentViewer)) { var helper = new DocumentViewerHelper(); var uiCtxCtrl = new DocumentViewerControl(textBufferFactoryService, dsTextEditorFactoryService, helper); var uiContext = new DocumentViewer(wpfCommandService, documentViewerServiceImpl, menuService, uiCtxCtrl); helper.RealInstance = uiContext; documentViewerServiceImpl.RaiseAddedEvent(uiContext); return uiContext; } return null; }
public IFileTabUIContext Create <T>() where T : class, IFileTabUIContext { if (typeof(T) == typeof(IDocumentViewer)) { var helper = new DocumentViewerHelper(); var uiCtxCtrl = new DocumentViewerControl(textBufferFactoryService, dnSpyTextEditorFactoryService, helper); var uiContext = new DocumentViewer(wpfCommandManager, documentViewerServiceImpl, menuManager, uiCtxCtrl); helper.RealInstance = uiContext; documentViewerServiceImpl.RaiseAddedEvent(uiContext); return(uiContext); } return(null); }