InstallerCollection.Item プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > InstallerCollection.Item プロパティの意味・解説 

InstallerCollection.Item プロパティ

指定したインデックスにあるインストーラ取得または設定します

名前空間: System.Configuration.Install
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
構文構文

解説解説

指定した Installer が InstallerCollection 内に配置されている場合、その InstallerParent プロパティには、そのコレクション格納している Installer設定されます。

使用例使用例

MyAssembly1.exeMyAssembly2.exe の AssemblyInstaller インスタンス作成する例を次に示します。これらのインスタンスは、TransactedInstaller に追加されます。インストールされるアセンブリすべての名前が、コンソール表示されます。インストール プロセスによって、MyAssembly1.exeMyAssembly2.exe両方インストールされます

Dim myTransactedInstaller As New
 TransactedInstaller()
Dim myAssemblyInstaller As AssemblyInstaller
Dim myInstallContext As InstallContext

' Create a instance of 'AssemblyInstaller' that installs 'MyAssembly1.exe'.
myAssemblyInstaller = New AssemblyInstaller("MyAssembly1.exe",
 Nothing)

' Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
myTransactedInstaller.Installers.Add(myAssemblyInstaller)

' Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'.
myAssemblyInstaller = New AssemblyInstaller("MyAssembly2.exe",
 Nothing)

' Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
  
myTransactedInstaller.Installers.Add(myAssemblyInstaller)

'Print the assemblies to be installed.
Dim myInstallers As InstallerCollection = myTransactedInstaller.Installers
Console.WriteLine(ControlChars.Newline + "Printing all assemblies
 to be installed")
Dim i As Integer
For i = 0 To myInstallers.Count - 1
   If myInstallers(i).GetType().Equals(GetType(AssemblyInstaller))
 Then
      Console.WriteLine("{0} {1}", i + 1, CType(myInstallers(i),
 AssemblyInstaller).Path)
   End If
Next i
TransactedInstaller myTransactedInstaller = new TransactedInstaller();
AssemblyInstaller myAssemblyInstaller;
InstallContext myInstallContext;

// Create a instance of 'AssemblyInstaller' that installs 'MyAssembly1.exe'.
myAssemblyInstaller = 
   new AssemblyInstaller("MyAssembly1.exe", null);

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
myTransactedInstaller.Installers.Add(myAssemblyInstaller);

// Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'.
myAssemblyInstaller = 
   new AssemblyInstaller("MyAssembly2.exe", null);

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
  
myTransactedInstaller.Installers.Add(myAssemblyInstaller);

//Print the assemblies to be installed.
InstallerCollection myInstallers = myTransactedInstaller.Installers;
Console.WriteLine("\nPrinting all assemblies to be installed");
for(int i = 0; i < myInstallers.Count; i++)
{
   if((myInstallers[i].GetType()).Equals(typeof(AssemblyInstaller)))
   {
      Console.WriteLine("{0} {1}", i + 1, 
         ((AssemblyInstaller)myInstallers[i]).Path);
   }
}
TransactedInstaller^ myTransactedInstaller = gcnew TransactedInstaller;
AssemblyInstaller^ myAssemblyInstaller;
InstallContext^ myInstallContext;

// Create a instance of 'AssemblyInstaller' that installs 'MyAssembly1.exe'.
myAssemblyInstaller = gcnew AssemblyInstaller( "MyAssembly1.exe",nullptr
 );

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
myTransactedInstaller->Installers->Add( myAssemblyInstaller );

// Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'.
myAssemblyInstaller = gcnew AssemblyInstaller( "MyAssembly2.exe",nullptr
 );

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
myTransactedInstaller->Installers->Add( myAssemblyInstaller );

//Print the assemblies to be installed.
InstallerCollection^ myInstallers = myTransactedInstaller->Installers;
Console::WriteLine( "\nPrinting all assemblies to be installed" );
for ( int i = 0; i < myInstallers->Count;
 i++ )
{
   if ( dynamic_cast<AssemblyInstaller^>(myInstallers[ i
 ]) )
   {
      Console::WriteLine( "{0} {1}", i + 1, safe_cast<AssemblyInstaller^>(myInstallers[
 i ])->Path );
   }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
InstallerCollection クラス
InstallerCollection メンバ
System.Configuration.Install 名前空間
Installer クラス


このページでは「.NET Framework クラス ライブラリ リファレンス」からInstallerCollection.Item プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からInstallerCollection.Item プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からInstallerCollection.Item プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

InstallerCollection.Item プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



InstallerCollection.Item プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS