Installer.Commit(IDictionary) 메서드

정의

파생 클래스에서 재정의할 때 설치 트랜잭션을 완료합니다.

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입니다.

예외

savedState 매개 변수가 null인 경우

또는

저장된 상태의 IDictionary가 손상되었을 가능성이 있는 경우

설치의 Commit(IDictionary) 단계를 수행하는 동안 예외가 발생한 경우. 이 예외는 무시되고 설치가 계속됩니다. 하지만 설치가 완료된 후에 애플리케이션이 제대로 작동하지 않을 수도 있습니다.

예제

다음 예제에서는 클래스의 Commit 메서드를 보여 줍니다 Installer . 클래스는 기본 클래스에서 Installer 파생되고 메서드는 재정의 Commit 됩니다.

// 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) 메서드를 호출해야 합니다. 메서드는 Commit(IDictionary) 이 instance 각 설치 관리자의 InstallerCollection 메서드가 성공한 경우에만 Install(IDictionary) 호출됩니다. 메서드는 Commit(IDictionary) 올바른 제거를 수행하는 데 필요한 정보를 저장하고 컬렉션에 Commit(IDictionary) 있는 각 설치 관리자의 메서드를 호출합니다.

적용 대상

추가 정보