Installer.Installers Eigenschaft

Definition

Ruft die Auflistung von Installationsprogrammen ab, die dieses Installationsprogramm enthält.

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

Eigenschaftswert

Eine InstallerCollection-Instanz, die die Auflistung von Installationsprogrammen enthält, die mit diesem Installationsprogramm verbunden sind.

Attribute

Beispiele

Im folgenden Beispiel werden die Installers Eigenschaften und Parent veranschaulicht. Die Installers -Eigenschaft zeigt die an, die InstallerCollection einem Installerzugeordnet ist.

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

Hinweise

Die Installers -Eigenschaft enthält eine Auflistung von Installern, die Objekte installieren, die von dieser Installer Instanz für die ordnungsgemäße Installation der Komponente erforderlich sind. Die InstallMethoden , Commit, Rollback, und Uninstall der Installer Klasse durchlaufen die Auflistung von Installern und rufen die entsprechende Methode jedes Installers auf.

Wenn diese Instanz von Installer in einer Installerauflistung enthalten ist, ist die Parent -Eigenschaft die Installer Instanz, die die Auflistung enthält. Ein Beispiel für die Verwendung der Installers Auflistung finden Sie in der AssemblyInstaller -Klasse.

Gilt für:

Weitere Informationen