Installer.Commit(IDictionary) 메서드

정의

파생 클래스에서 재정의할 때 설치 트랜잭션을 완료합니다.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)

매개 변수

savedState
IDictionary

컬렉션에 있는 모든 설치 관리자가 실행된 후의 컴퓨터 상태가 포함된 IDictionary입니다.An IDictionary that contains the state of the computer after all the installers in the collection have run.

예외

savedState 매개 변수가 null인 경우The savedState parameter is null.

또는-or- 저장된 상태의 IDictionary가 손상되었을 가능성이 있는 경우The saved-state IDictionary might have been corrupted.

설치의 Commit(IDictionary) 단계를 수행하는 동안 예외가 발생한 경우.An exception occurred during the Commit(IDictionary) phase of the installation. 이 예외는 무시되고 설치가 계속됩니다.This exception is ignored and the installation continues. 하지만 설치가 완료된 후에 애플리케이션이 제대로 작동하지 않을 수도 있습니다.However, the application might not function correctly after the installation is complete.

예제

다음 예제는 Commit 메서드는 Installer 클래스입니다.The following example demonstrates the Commit method of the Installer class. 클래스에서 파생 되는 Installer 기본 클래스 및 Commit 메서드 재정의 됩니다.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(IDictionary) 파생된 클래스에서 메서드를 기본 클래스를 호출 해야 Commit(IDictionary) 메서드를 먼저 파생된 메서드.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. 합니다 Commit(IDictionary) 경우에 메서드가 호출 될 합니다 Install(IDictionary) 메서드의이 인스턴스에 있는 각 설치 관리자 InstallerCollection 성공 합니다.The Commit(IDictionary) method is called only if the Install(IDictionary) method of each installer in this instance's InstallerCollection succeeds. 합니다 Commit(IDictionary) 메서드는 올바른 제거 및 호출을 수행 하는 데 필요한 정보를 저장 합니다 Commit(IDictionary) 컬렉션의 각 설치 관리자의 메서드.The Commit(IDictionary) method stores information needed to do a correct uninstallation, and calls the Commit(IDictionary) method of each installer in the collection.

적용 대상

추가 정보