Compartir a través de


Installer.BeforeInstall Evento

Definición

Se produce antes de ejecutarse el método Install(IDictionary) de cada instalador en la colección de instaladores.

public:
 event System::Configuration::Install::InstallEventHandler ^ BeforeInstall;
public event System.Configuration.Install.InstallEventHandler BeforeInstall;
member this.BeforeInstall : System.Configuration.Install.InstallEventHandler 
Public Custom Event BeforeInstall As InstallEventHandler 

Tipo de evento

Ejemplos

En el ejemplo siguiente se muestra el BeforeInstall evento . Se genera mediante el OnBeforeInstall método .

   // MyInstaller is derived from the class 'Installer'.
private:
   MyInstaller()
   {
      BeforeInstall += gcnew InstallEventHandler( this, &MyInstaller::BeforeInstallEventHandler );
   }

   void BeforeInstallEventHandler( Object^ sender, InstallEventArgs^ e )
   {
      // Add steps to perform any actions before the install process.
      Console::WriteLine( "Code for BeforeInstallEventHandler" );
   }
// MyInstaller is derived from the class 'Installer'.
MyInstaller() : base()
{
   BeforeInstall += new InstallEventHandler(BeforeInstallEventHandler);
}
private void BeforeInstallEventHandler(object sender, InstallEventArgs e)
{
   // Add steps to perform any actions before the install process.
   Console.WriteLine("Code for BeforeInstallEventHandler");
}
' MyInstaller is derived from the class 'Installer'.
Sub New()
   MyBase.New()
   AddHandler BeforeInstall, AddressOf BeforeInstallEventHandler
End Sub

Private Sub BeforeInstallEventHandler(sender As Object, e As InstallEventArgs)
   ' Add steps to perform any actions before the install process.
   Console.WriteLine("Code for BeforeInstallEventHandler")
End Sub

Se aplica a

Consulte también