Installer.Installers Właściwość

Definicja

Pobiera kolekcję instalatorów, które zawiera ten instalator.

C#
[System.ComponentModel.Browsable(false)]
public System.Configuration.Install.InstallerCollection Installers { get; }

Wartość właściwości

Element InstallerCollection zawierający kolekcję instalatorów skojarzonych z tym instalatorem.

Atrybuty

Przykłady

W poniższym przykładzie przedstawiono Installers właściwości i Parent . Właściwość Installers pokazuje skojarzona InstallerCollection z elementem Installer.

C#
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());

Uwagi

Właściwość Installers zawiera kolekcję instalatorów, które instalują obiekty wymagane przez to Installer wystąpienie do poprawnego zainstalowania składnika. Metody Install, Commit, Rollbacki Uninstall klasy Installer przechodzą przez kolekcję instalatorów i wywołuje odpowiednią metodę każdego instalatora.

Jeśli to wystąpienie znajduje Installer się w kolekcji instalatora, Parent właściwość jest Installer wystąpieniem zawierającym kolekcję. Przykład użycia Installers kolekcji można znaleźć w AssemblyInstaller klasie .

Dotyczy

Produkt Wersje
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Zobacz też