Installer.Commit(IDictionary) Installer.Commit(IDictionary) Installer.Commit(IDictionary) Installer.Commit(IDictionary) Method

Definición

Cuando se reemplaza en una clase derivada, finaliza la transacción de instalación.When overridden in a derived class, completes the install transaction.

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

Parámetros

savedState
IDictionary IDictionary IDictionary IDictionary

IDictionary que contiene el estado del equipo tras ejecutarse todos los instaladores de la colección.An IDictionary that contains the state of the computer after all the installers in the collection have run.

Excepciones

El parámetro savedState es null.The savedState parameter is null.

O bien-or- Puede estar dañada la interfaz IDictionary de estado guardado.The saved-state IDictionary might have been corrupted.

Se ha producido una excepción durante la fase Commit(IDictionary) de la instalación.An exception occurred during the Commit(IDictionary) phase of the installation. Se omite esta excepción y continúa la instalación.This exception is ignored and the installation continues. Sin embargo, puede que la aplicación no funcione correctamente una vez finalizada la instalación.However, the application might not function correctly after the installation is complete.

Ejemplos

En el ejemplo siguiente se muestra el Commit método de la Installer clase.The following example demonstrates the Commit method of the Installer class. Una clase se deriva el Installer clase base y la Commit se invalidan el método.A class is derived from the Installer base class and the Commit method are overridden.

// Override the 'Commit' method of the Installer class.
virtual void Commit( IDictionary^ mySavedState ) override
{
   Installer::Commit( mySavedState );
   Console::WriteLine( "The Commit method of 'MyInstallerSample' "
      "has been called" );
}
// Override the 'Commit' method of the Installer class.
public override void Commit( IDictionary mySavedState )
{
   base.Commit( mySavedState );
   Console.WriteLine( "The Commit method of 'MyInstallerSample'"
                     + "has been called" );
}
' Override the 'Commit' method of the Installer class.
Public Overrides Sub Commit(mySavedState As IDictionary)
   MyBase.Commit(mySavedState)
   Console.WriteLine("The Commit method of 'MyInstallerSample'" + _
                                                "has been called")
End Sub 'Commit

Notas a los desarrolladores de herederos

Si invalida el Commit(IDictionary) método en una clase derivada, asegúrese de llamar a la clase base Commit(IDictionary) método primero en el método derivado.If you override the Commit(IDictionary) method in a derived class, be sure to call the base class's Commit(IDictionary) method first in your derived method. El Commit(IDictionary) se llama al método solo si el Install(IDictionary) método de cada instalador en esta instancia InstallerCollection se realiza correctamente.The Commit(IDictionary) method is called only if the Install(IDictionary) method of each installer in this instance's InstallerCollection succeeds. El Commit(IDictionary) método almacena la información necesaria para realizar una desinstalación correcta y llama a la Commit(IDictionary) método de cada instalador en la colección.The Commit(IDictionary) method stores information needed to do a correct uninstallation, and calls the Commit(IDictionary) method of each installer in the collection.

Se aplica a

Consulte también: