ComponentInstaller.IsEquivalentInstaller(ComponentInstaller) 메서드

정의

지정한 설치 관리자에서 같은 개체를 설치 관리자로 설치했는지 확인합니다.

public:
 virtual bool IsEquivalentInstaller(System::Configuration::Install::ComponentInstaller ^ otherInstaller);
public virtual bool IsEquivalentInstaller (System.Configuration.Install.ComponentInstaller otherInstaller);
abstract member IsEquivalentInstaller : System.Configuration.Install.ComponentInstaller -> bool
override this.IsEquivalentInstaller : System.Configuration.Install.ComponentInstaller -> bool
Public Overridable Function IsEquivalentInstaller (otherInstaller As ComponentInstaller) As Boolean

매개 변수

otherInstaller
ComponentInstaller

비교할 설치 관리자입니다.

반환

해당 설치 관리자와 otherInstaller 매개 변수에서 지정한 설치 관리자에서 같은 개체를 설치한 경우 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 클래스를 정의 MyInstallClass이벤트 로그를 작성 하 고 복사 로그 이벤트의 속성에 구성 요소는 EventLogInstaller 개체입니다. 또한 확인 여부 ServiceInstaller 개체는 동일한 종류의 설치로 처리할 수 EventLogInstaller입니다.

ServiceInstaller^ myServiceInstaller = gcnew ServiceInstaller;
// Check whether 'ServiceInstaller' object can handle the same
// kind of installation as 'EventLogInstaller' object.
if ( myEventLogInstaller->IsEquivalentInstaller( myServiceInstaller ) )
{
   Console::WriteLine( "'ServiceInstaller' can handle the same kind " +
      "of installation as EventLogInstaller" );
}
else
{
   Console::WriteLine( "'ServiceInstaller' can't handle the same " +
      "kind of installation as 'EventLogInstaller'" );
}
ServiceInstaller myServiceInstaller = new  ServiceInstaller();
// Check whether 'ServiceInstaller' object can handle the same
// kind of installation as 'EventLogInstaller' object.
if(myEventLogInstaller.IsEquivalentInstaller(myServiceInstaller))
{
   Console.WriteLine("'ServiceInstaller' can handle the same kind"
                     +" of installation as EventLogInstaller");
}
else
{
    Console.WriteLine("'ServiceInstaller' can't handle the same"
                 +" kind of installation as 'EventLogInstaller'");
}
Dim myServiceInstaller As New ServiceInstaller()
' Check whether 'ServiceInstaller' object can handle the same 
' kind of installation as 'EventLogInstaller' object.
If myEventLogInstaller.IsEquivalentInstaller(myServiceInstaller) Then
   Console.WriteLine("'ServiceInstaller' can handle the same kind" + _
                              " of installation as EventLogInstaller")
Else
   Console.WriteLine("'ServiceInstaller' can't handle the same" + _
                        " kind of installation as 'EventLogInstaller'")
End If

설명

일반적으로 IsEquivalentInstaller 반환 true 이 설치 관리자와 설치 관리자에서 지정 하는 경우에는 otherInstaller 매개 변수는 동일한 개체를 설치 합니다. 이러한 경우에 호출 된 Install 또는 Uninstall 메서드 같은 시스템 상태에서 설치 관리자 결과 중 하나를 합니다.

적용 대상