Поделиться через


Installer.BeforeUninstall Событие

Определение

Происходит до выполнения операций удаления установщиками из свойства Installers.

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

Тип события

Примеры

В следующем примере показано BeforeUninstall событие . Он вызывается методом OnBeforeUninstall .

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

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

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

Применяется к

См. также раздел