Installer.Install(IDictionary) Método

Definición

Cuando se reemplaza en una clase derivada, se lleva a cabo la instalación.

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

Parámetros

stateSaver
IDictionary

IDictionary que se utiliza con el fin de guardar la información necesaria para realizar una operación de confirmar, deshacer o desinstalar.

Excepciones

El parámetro stateSaver es null.

Se ha producido una excepción en el controlador de eventos BeforeInstall de uno de los instaladores de la colección.

o bien

Se ha producido una excepción en el controlador de eventos AfterInstall de uno de los instaladores de la colección.

Ejemplos

En el ejemplo siguiente se muestra el Install método de la Installer clase . Una clase se deriva de la Installer clase base y el Install método se invalida.

   // Override the 'Install' method of the Installer class.
public:
   virtual void Install( IDictionary^ mySavedState ) override
   {
      Installer::Install( mySavedState );
      // Code maybe written for installation of an application.
      Console::WriteLine( "The Install method of 'MyInstallerSample' has been called" );
   }
// Override the 'Install' method of the Installer class.
public override void Install( IDictionary mySavedState )
{
   base.Install( mySavedState );
   // Code maybe written for installation of an application.
   Console.WriteLine( "The Install method of 'MyInstallerSample' has been called" );
}
' Override the 'Install' method of the Installer class.
Public Overrides Sub Install(mySavedState As IDictionary)
   MyBase.Install(mySavedState)
   ' Code maybe written for installation of an application.
   Console.WriteLine("The Install method of 'MyInstallerSample' has been called")
End Sub

Notas a los desarrolladores de herederos

Se aplica a

Consulte también