Installer.OnBeforeInstall(IDictionary) 메서드

정의

BeforeInstall 이벤트를 발생시킵니다.

protected:
 virtual void OnBeforeInstall(System::Collections::IDictionary ^ savedState);
protected virtual void OnBeforeInstall (System.Collections.IDictionary savedState);
abstract member OnBeforeInstall : System.Collections.IDictionary -> unit
override this.OnBeforeInstall : System.Collections.IDictionary -> unit
Protected Overridable Sub OnBeforeInstall (savedState As IDictionary)

매개 변수

savedState
IDictionary

IDictionary 속성의 설치 관리자가 설치되기 전의 컴퓨터 상태가 포함된 Installers입니다. 이때 이 IDictionary 개체는 비어있어야 합니다.

예제

다음 예제는 OnBeforeInstall 메서드. 이 메서드는 파생 클래스에서 재정의됩니다. 메서드에 설치 OnBeforeInstall 하기 전에 수행할 단계를 추가하기 위한 공간이 제공됩니다.

   // Override the 'OnBeforeInstall' method.
protected:
   virtual void OnBeforeInstall( IDictionary^ savedState ) override
   {
      Installer::OnBeforeInstall( savedState );
      
      // Add steps to be done before the installation starts.
      Console::WriteLine( "OnBeforeInstall method of MyInstaller called" );
   }
// Override the 'OnBeforeInstall' method.
protected override void OnBeforeInstall(IDictionary savedState)
{
   base.OnBeforeInstall(savedState);
   // Add steps to be done before the installation starts.
   Console.WriteLine("OnBeforeInstall method of MyInstaller called");
}
' Override the 'OnBeforeInstall' method.
Protected Overrides Sub OnBeforeInstall(savedState As IDictionary)
   MyBase.OnBeforeInstall(savedState)
   ' Add steps to be done before the installation starts.
   Console.WriteLine("OnBeforeInstall method of MyInstaller called")
End Sub

설명

이 메서드는 이 instance InstallerCollection 설치 관리자의 메서드가 호출되기 전에 Install 호출됩니다.

이벤트가 발생하면 대리자를 통해 이벤트 처리기가 호출됩니다. 자세한 내용은 이벤트 처리 및 발생합니다.

OnBeforeInstall 메서드를 사용 하면 파생된 클래스가 대리자를 연결 하지 않고 이벤트를 처리할 수 있습니다. 이는 파생 클래스에서 이벤트를 처리하는 기본 방법입니다.

상속자 참고

파생 클래스에서 OnBeforeInstall(IDictionary)를 재정의하는 경우 등록된 대리자가 이벤트를 받도록 기본 클래스의 OnBeforeInstall(IDictionary) 메서드를 호출해야 합니다.

적용 대상

추가 정보