Installer.Parent Propiedad

Definición

Obtiene o establece el instalador que contiene la colección a la que pertenece este instalador.

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

Valor de propiedad

Installer que contiene la colección a la que pertenece esta instancia o null si esta instancia no pertenece a ninguna colección.

Atributos

Ejemplos

En el ejemplo siguiente se muestra la Parent propiedad . La Parent propiedad obtiene el Installer objeto que contiene la colección a la que pertenece.Installer

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())

Comentarios

Si esta instancia de Installer forma parte de una colección de instaladores, la Parent propiedad se establece en la Installer instancia que contiene la colección. Para obtener un ejemplo del uso de la Installers colección, vea la AssemblyInstaller clase .

La Installers propiedad contiene una colección de instaladores. Los Installmétodos , Commit, Rollbacky Uninstall de la Installer clase pasan por la colección de instaladores e invocan el método correspondiente de cada instalador.

Se aplica a

Consulte también