ComponentInstaller.IsEquivalentInstaller(ComponentInstaller) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 설치 관리자가 이 설치 관리자와 동일한 개체를 설치하는지 여부를 확인합니다.
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
비교할 설치 관리자입니다.
반품
true 이 설치 관리자와 매개 변수에서 지정한 설치 관리자가 동일한 개체를 otherInstaller 설치하면 되며, false그렇지 않으면 .
예제
다음 예제에서는 이벤트 로그를 만들고 이벤트 로그 구성 요소의 속성을 개체에 복사하는 클래스 MyInstallClass를 EventLogInstaller 정의합니다. 또한 개체가 .와 동일한 종류의 설치EventLogInstaller를 처리할 수 있는지 여부를 ServiceInstaller 확인합니다.
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 이 설치 관리자와 매개 변수에 지정된 설치 관리자가 동일한 개체를 otherInstaller 설치하는 경우에만 반환 true 됩니다. 이러한 경우 두 설치 관리자에서 또는 Uninstall 메서드를 Install 호출하면 동일한 시스템 상태가 발생합니다.