Installer.Installers 속성

정의

이 설치 관리자에 포함된 설치 관리자 컬렉션을 가져옵니다.Gets the collection of installers that this installer contains.

public:
 property System::Configuration::Install::InstallerCollection ^ Installers { System::Configuration::Install::InstallerCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Configuration.Install.InstallerCollection Installers { get; }
member this.Installers : System.Configuration.Install.InstallerCollection
Public ReadOnly Property Installers As InstallerCollection

속성 값

이 설치 관리자와 관련된 설치 관리자 컬렉션이 포함된 InstallerCollection입니다.An InstallerCollection containing the collection of installers associated with this installer.

특성

예제

다음 예제는 InstallersParent 속성입니다.The following example demonstrates the Installers and Parent properties. Installers 속성을 InstallerCollection 연관는 Installer합니다.The Installers property shows the InstallerCollection associated with an Installer.

AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller;
ServiceInstaller^ myServiceInstaller = gcnew ServiceInstaller;
EventLogInstaller^ myEventLogInstaller = gcnew EventLogInstaller;

InstallerCollection^ myInstallerCollection = myAssemblyInstaller->Installers;

// Add Installers to the InstallerCollection of 'myAssemblyInstaller'.
myInstallerCollection->Add( myServiceInstaller );
myInstallerCollection->Add( myEventLogInstaller );

array<Installer^>^ myInstaller = gcnew array<Installer^>(2);
myInstallerCollection->CopyTo( myInstaller, 0 );
// Show the contents of the InstallerCollection of 'myAssemblyInstaller'.
Console::WriteLine( "Installers in the InstallerCollection : " );
for ( int iIndex = 0; iIndex < myInstaller->Length; iIndex++ )
   Console::WriteLine( myInstaller[ iIndex ]->ToString() );
AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller();
ServiceInstaller myServiceInstaller = new ServiceInstaller();
EventLogInstaller myEventLogInstaller = new EventLogInstaller();

InstallerCollection myInstallerCollection = myAssemblyInstaller.Installers;

// Add Installers to the InstallerCollection of 'myAssemblyInstaller'.
myInstallerCollection.Add(myServiceInstaller);
myInstallerCollection.Add(myEventLogInstaller);

Installer[] myInstaller = new Installer[2];
myInstallerCollection.CopyTo(myInstaller,0);
// Show the contents of the InstallerCollection of 'myAssemblyInstaller'.
Console.WriteLine("Installers in the InstallerCollection : ");
for (int iIndex=0; iIndex < myInstaller.Length; iIndex++)
   Console.WriteLine(myInstaller[iIndex].ToString());
Dim myAssemblyInstaller As New AssemblyInstaller()
Dim myServiceInstaller As New ServiceInstaller()
Dim myEventLogInstaller As New EventLogInstaller()
Dim myInstallerCollection As InstallerCollection = _
                                       myAssemblyInstaller.Installers

' Add Installers to the InstallerCollection of 'myAssemblyInstaller'.
myInstallerCollection.Add(myServiceInstaller)
myInstallerCollection.Add(myEventLogInstaller)

Dim myInstaller(1) As Installer
myInstallerCollection.CopyTo(myInstaller, 0)
' Show the contents of the InstallerCollection of 'myAssemblyInstaller'.
Console.WriteLine("Installers in the InstallerCollection : ")
Dim iIndex As Integer
For iIndex = 0 To myInstaller.Length - 1
   Console.WriteLine(myInstaller(iIndex).ToString())
Next iIndex

설명

합니다 Installers 이 필요한 개체를 설치 하는 설치 관리자의 컬렉션을 포함 하는 속성 Installer 인스턴스가 올바르게 구성 요소를 설치 합니다.The Installers property contains a collection of installers that install objects needed by this Installer instance to correctly install the component. 합니다 Install, Commit, Rollback, 및 Uninstall 의 메서드는 Installer 클래스는 설치 관리자의 컬렉션을 이동 하 고 각 설치 관리자의 해당 메서드를 호출 합니다.The Install, Commit, Rollback, and Uninstall methods of the Installer class go through the collection of installers and invokes the corresponding method of each installer.

경우이 인스턴스의 Installer 는 설치 관리자 컬렉션에 포함 되어 합니다 Parent 속성이 Installer 인스턴스 컬렉션을 포함 하 합니다.If this instance of Installer is contained in an installer collection, the Parent property is the Installer instance that contains the collection. 사용의 예는 Installers 컬렉션에 참조를 AssemblyInstaller 클래스입니다.For an example of the use of the Installers collection, see the AssemblyInstaller class.

적용 대상

추가 정보