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

적용 대상

추가 정보