Metoda IDTExtensibility2.OnDisconnection —

Występuje zawsze, gdy dodatek jest wyładowane ze Visual Studio.

Przestrzeń nazw:  Extensibility
Zestaw:  Extensibility (w Extensibility.dll)

Składnia

'Deklaracja
Sub OnDisconnection ( _
    RemoveMode As ext_DisconnectMode, _
    ByRef custom As Array _
)
void OnDisconnection(
    ext_DisconnectMode RemoveMode,
    ref Array custom
)
void OnDisconnection(
    [InAttribute] ext_DisconnectMode RemoveMode, 
    [InAttribute] Array^% custom
)
abstract OnDisconnection : 
        RemoveMode:ext_DisconnectMode * 
        custom:Array byref -> unit
function OnDisconnection(
    RemoveMode : ext_DisconnectMode, 
    custom : Array
)

Parametry

  • custom
    Typ: Array%

    Pusta tablica, który służy do przekazywania danych specyficznych dla hosta do użytku po dodatku usuwa z pamięci.

Uwagi

OnDisconnection, który jest podobny do OnBeginShutdown, występuje zawsze, gdy dodatek jest zwalniany, ale pozostanie uruchomiony, zintegrowane środowisko programistyczne (IDE). (OnBeginShutdown występuje zawsze, gdy IDE jest wyłączony, które niekoniecznie zwalnia dodatki, które są uruchomione.)

Przykłady

Public Sub OnDisconnection(ByVal disconnectMode As  _
ext_DisconnectMode, ByRef custom As Array) Implements _
IDTExtensibility2.OnDisconnection
    MsgBox("Place cleanup code here.")
End Sub
public void OnDisconnection(ext_DisconnectMode disconnectMode, ref 
Array custom)
{
    // Place cleanup code here.
    System.Windows.Forms.MessageBox.Show("Add-in is shutting down.");
}

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

IDTExtensibility2 Interfejs

Przestrzeń nazw Extensibility

IDTExtensibility2

OnConnection

OnAddInsUpdate

OnBeginShutdown

OnStartupComplete

Inne zasoby

Porady: tworzenie dodatku