IDTExtensibility2.OnDisconnection メソッド

アドインが Visual Studio からアンロードされるたびに発生します。

名前空間:  Extensibility
アセンブリ:  Extensibility (Extensibility.dll 内)

構文

'宣言
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
)

パラメーター

  • custom
    型 : System.Array%
    アドインのアンロード後に使用されるホスト固有のデータを渡すために使用できる空の配列です。

解説

OnDisconnection は OnBeginShutdown に似ています。アドインがアンロードされても、統合開発環境 (IDE) が引き続き実行される場合に発生します(OnBeginShutdown は IDE がシャットダウンされるたびに発生し、実行中のアドインは必ずアンロードされます)。

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.");
}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

IDTExtensibility2 インターフェイス

Extensibility 名前空間

IDTExtensibility2

OnConnection

OnAddInsUpdate

OnBeginShutdown

OnStartupComplete

その他の技術情報

方法 : アドインを作成する