public DocumentDetetionService(Document document, VSProject2 vsProject2, DTE2 dte2, IAssemblyDetectionProvider assemblyDetectionProvider) { _document = document; _vsProject2 = vsProject2; _dte2 = dte2; _assemblyDetectionProvider = assemblyDetectionProvider; }
public DetectionForm(Document document, VSProject2 vsProject2, DTE2 dte, IAssemblyDetectionProvider assemblyDetectionProvider) { _vsProject2 = vsProject2; DocumentDetetionService = new DocumentDetetionService(document, vsProject2, dte, assemblyDetectionProvider); InitializeComponent(); }
/// <summary>Implementiert die OnConnection-Methode der IDTExtensibility2-Schnittstelle. Empfängt eine Benachrichtigung, wenn das Add-In geladen wird.</summary> /// <param term='application'>Stammobjekt der Hostanwendung.</param> /// <param term='connectMode'>Beschreibt, wie das Add-In geladen wird.</param> /// <param term='addInInst'>Objekt, das dieses Add-In darstellt.</param> /// <seealso class='IDTExtensibility2' /> public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { _applicationObject = (DTE2) application; _addInInstance = (AddIn) addInInst; AssemblyDetectionProvider = new AssemblyDetectionProvider(new AssemblyDetectionService(), new AssemblyMemoryStoreService()); var oCommandBar = ((CommandBars)_applicationObject.CommandBars)["Code Window"]; var button = (CommandBarButton) oCommandBar.Controls.Add(MsoControlType.msoControlButton, Missing.Value, Missing.Value, 1, true); button.Caption = "Reference detection"; _oSubMenuItemHandler = (CommandBarEvents)_applicationObject.Events.get_CommandBarEvents(button); _oSubMenuItemHandler.Click += ProcessDetectButtonClick; }
public void Setup() { DetectionProvider = new AssemblyDetectionProvider(new AssemblyDetectionService(), new AssemblyMemoryStoreService()); }
/// <summary>Implementiert die OnDisconnection-Methode der IDTExtensibility2-Schnittstelle. Empfängt eine Benachrichtigung, wenn das Add-In entladen wird.</summary> /// <param term='disconnectMode'>Beschreibt, wie das Add-In entladen wird.</param> /// <param term='custom'>Array von spezifischen Parametern für die Hostanwendung.</param> /// <seealso class='IDTExtensibility2' /> public void OnDisconnection(ext_DisconnectMode disconnectMode, ref Array custom) { AssemblyDetectionProvider = null; }