Installer.Parent 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定安裝程式,包含該安裝程式所屬的集合。
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
屬性值
包含 Installer 該實例所屬的集合,或 null 若該實例不屬於某集合。
- 屬性
範例
以下範例展示了該 Parent 性質。 該Parent屬性獲得包含該Installer集合的 。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())
備註
如果這個實例 Installer 是安裝程式集合的一部分,屬性 Parent 會被設定為 Installer 包含該集合的實例。 關於集合的使用Installers範例,請參見類別。AssemblyInstaller
該 Installers 物業內有一群安裝工。 Install類別中的 Installer 、 Commit、 Rollback和 Uninstall 方法會經過安裝程式集合,並呼叫每個安裝程式對應的方法。