다음을 통해 공유


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가 종료될 때마다 발생합니다. 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

기타 리소스

방법: 추가 기능 만들기