Installer.Parent Właściwość

Definicja

Pobiera lub ustawia instalatora zawierającego kolekcję, do którego należy ten instalator.

public:
 property System::Configuration::Install::Installer ^ Parent { System::Configuration::Install::Installer ^ get(); void set(System::Configuration::Install::Installer ^ value); };
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter("System.Configuration.Design.InstallerParentConverter")]
public System.Configuration.Install.Installer Parent { get; set; }
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Configuration.Install.InstallerParentConverter))]
public System.Configuration.Install.Installer Parent { get; set; }
[<System.ComponentModel.Browsable(true)>]
[<System.ComponentModel.TypeConverter("System.Configuration.Design.InstallerParentConverter")>]
member this.Parent : System.Configuration.Install.Installer with get, set
[<System.ComponentModel.Browsable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.Install.InstallerParentConverter))>]
member this.Parent : System.Configuration.Install.Installer with get, set
Public Property Parent As Installer

Wartość właściwości

Kolekcja Installer zawierająca, do którego należy to wystąpienie, lub null jeśli to wystąpienie nie należy do kolekcji.

Atrybuty

Przykłady

W poniższym przykładzie przedstawiono Parent właściwość . Właściwość Parent pobiera Installer kolekcję zawierającą, do której Installer należy.

AssemblyInstaller^ myAssemblyInstaller1 = gcnew AssemblyInstaller;
InstallerCollection^ myInstallerCollection1 = myAssemblyInstaller1->Installers;
// 'myAssemblyInstaller' is an installer of type 'AssemblyInstaller'.
myInstallerCollection1->Add( myAssemblyInstaller );

Installer^ myInstaller1 = myAssemblyInstaller->Parent;
Console::WriteLine( "Parent of myAssembly : {0}", myInstaller1 );
AssemblyInstaller myAssemblyInstaller1 = new AssemblyInstaller();
InstallerCollection myInstallerCollection1 = myAssemblyInstaller1.Installers;
// 'myAssemblyInstaller' is an installer of type 'AssemblyInstaller'.
myInstallerCollection1.Add(myAssemblyInstaller);

Installer myInstaller1 = myAssemblyInstaller.Parent;
Console.WriteLine("Parent of myAssembly : {0}", myInstaller1.ToString());
Dim myAssemblyInstaller1 As New AssemblyInstaller()
Dim myInstallerCollection1 As InstallerCollection = _
                                      myAssemblyInstaller1.Installers
' 'myAssemblyInstaller' is an installer of type 'AssemblyInstaller'.
myInstallerCollection1.Add(myAssemblyInstaller)

Dim myInstaller1 As Installer = myAssemblyInstaller.Parent
Console.WriteLine("Parent of myAssembly : {0}", myInstaller1.ToString())

Uwagi

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

Właściwość Installers zawiera kolekcję instalatorów. Metody Install, Commit, Rollbacki Uninstall klasy Installer przechodzą przez kolekcję instalatorów i wywołuje odpowiednią metodę każdego instalatora.

Dotyczy

Zobacz też