Installer.Uninstall(IDictionary) Methode

Definitie

Wanneer deze wordt overschreven in een afgeleide klasse, verwijdert u een installatie.

public:
 virtual void Uninstall(System::Collections::IDictionary ^ savedState);
public virtual void Uninstall(System.Collections.IDictionary savedState);
abstract member Uninstall : System.Collections.IDictionary -> unit
override this.Uninstall : System.Collections.IDictionary -> unit
Public Overridable Sub Uninstall (savedState As IDictionary)

Parameters

savedState
IDictionary

Een IDictionary met de status van de computer nadat de installatie is voltooid.

Uitzonderingen

De opgeslagen status IDictionary is mogelijk beschadigd.

Er is een uitzondering opgetreden tijdens het verwijderen. Deze uitzondering wordt genegeerd en de verwijdering wordt voortgezet. De toepassing kan echter niet volledig worden verwijderd nadat het verwijderen is voltooid.

Voorbeelden

In het volgende voorbeeld ziet u de Uninstall methode van Installer. De Uninstall methode wordt overschreven in de afgeleide klasse van Installer.

   // Override 'Uninstall' method of Installer class.
public:
   virtual void Uninstall( IDictionary^ mySavedState ) override
   {
      if ( mySavedState == nullptr )
      {
         Console::WriteLine( "Uninstallation Error !" );
      }
      else
      {
         Installer::Uninstall( mySavedState );
         Console::WriteLine( "The Uninstall method of 'MyInstallerSample' has been called" );
      }
   }
// Override 'Uninstall' method of Installer class.
public override void Uninstall( IDictionary mySavedState )
{
   if (mySavedState == null)
   {
      Console.WriteLine("Uninstallation Error !");
   }
   else
   {
      base.Uninstall( mySavedState );
      Console.WriteLine( "The Uninstall method of 'MyInstallerSample' has been called" );
   }
}
' Override 'Uninstall' method of Installer class.
Public Overrides Sub Uninstall(mySavedState As IDictionary)
   If mySavedState Is Nothing Then
      Console.WriteLine("Uninstallation Error !")
   Else
      MyBase.Uninstall(mySavedState)
      Console.WriteLine("The Uninstall method of 'MyInstallerSample' has been called")
   End If
End Sub

Notities voor overnemers

Van toepassing op

Zie ook