다음을 통해 공유


CommandEventsClass.BeforeExecute 이벤트

이 API는 .NET Framework 인프라를 지원하며 사용자 코드에서 직접 사용할 수 없습니다.

명령이 실행되기 전에 발생합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Public Overridable Event BeforeExecute As _dispCommandEvents_BeforeExecuteEventHandler
public virtual event _dispCommandEvents_BeforeExecuteEventHandler BeforeExecute
public:
virtual   event _dispCommandEvents_BeforeExecuteEventHandler^ BeforeExecute {
    void add (_dispCommandEvents_BeforeExecuteEventHandler^ value);
    void remove (_dispCommandEvents_BeforeExecuteEventHandler^ value);
}
abstract BeforeExecute : IEvent<_dispCommandEvents_BeforeExecuteEventHandler,
    EventArgs>
override BeforeExecute : IEvent<_dispCommandEvents_BeforeExecuteEventHandler,
    EventArgs>
JScript에서는 이벤트를 지원하지 않습니다.

구현

_dispCommandEvents_Event.BeforeExecute

설명

명령을 구현하도록 선언된 함수를 실행하기 전에 BeforeExecute 이벤트가 발생합니다. 모든 수신기는 이 이벤트에 대해 등록될 수 있습니다. 각 수신기는 이벤트가 발생하면 실행됩니다.

한 수신기에서 명령을 구현하면 다른 수신기나 함수에서 그 명령을 구현하지 않아야 합니다. 수신기는 명령을 구현한 다음, 처리된 매개 변수에 대해 true를 반환합니다. 명령에서 발생시킨 로그 엔트리를 만들거나 다른 위치에 표시된 카운터를 증가시키는 등 수신기가 수행하지 않아야 할 추가 기능만 수행하는 경우 수신기는 처리된 매개 변수에 대해 false를 반환합니다.

CommandEvents.BeforeExecute을 사용하십시오.

예제

Public Sub CommandEvents_BeforeExecute(ByVal Guid As String, ByVal ID As Integer, ByVal CustomIn As Object, ByVal CustomOut As Object, ByRef CancelDefault As Boolean) Handles CommandEvents.BeforeExecute
   MsgBox("test")
End Sub

.NET Framework 보안

참고 항목

참조

CommandEventsClass 클래스

EnvDTE 네임스페이스