InstallerCollection.Insert メソッドとは何? わかりやすく解説 Weblio辞書 (original) (raw)

日本マイクロソフト株式会社日本マイクロソフト株式会社

InstallerCollection.Insert メソッド

コレクション内の指定したインデックスに、指定したインストーラ挿入します

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

使用例使用例

次の例は、AddRange メソッドの例と同じです。この例の詳細については、AddRange メソッドの例を参照してください

Dim myTransactedInstaller1 As New TransactedInstaller() Dim myTransactedInstaller2 As New TransactedInstaller() Dim myAssemblyInstaller As New 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'. myTransactedInstaller1.Installers.Insert(0, myAssemblyInstaller)

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

' Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller1.Installers.Insert(1, myAssemblyInstaller)

' Copy the installers of 'myTransactedInstaller1' to 'myTransactedInstaller2'. myTransactedInstaller2.Installers.AddRange(myTransactedInstaller1.Installers)

TransactedInstaller myTransactedInstaller1 = new TransactedInstaller(); TransactedInstaller myTransactedInstaller2 = new TransactedInstaller(); AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller(); 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'. myTransactedInstaller1.Installers.Insert(0, myAssemblyInstaller);

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

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller1.Installers.Insert(1, myAssemblyInstaller);

// Copy the installers of 'myTransactedInstaller1' to 'myTransactedInstaller2'. myTransactedInstaller2.Installers.AddRange(myTransactedInstaller1.Installers);

TransactedInstaller^ myTransactedInstaller1 = gcnew TransactedInstaller; TransactedInstaller^ myTransactedInstaller2 = gcnew TransactedInstaller; AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller; 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'. myTransactedInstaller1->Installers->Insert( 0, myAssemblyInstaller );

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

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller1->Installers->Insert( 1, myAssemblyInstaller );

// Copy the installers of 'myTransactedInstaller1' to 'myTransactedInstaller2'. myTransactedInstaller2->Installers->AddRange( myTransactedInstaller1->Installers );

TransactedInstaller myTransactedInstaller1 = new TransactedInstaller(); TransactedInstaller myTransactedInstaller2 = new TransactedInstaller(); AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller(); 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'. myTransactedInstaller1.get_Installers().Insert(0, myAssemblyInstaller);

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

// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller1.get_Installers().Insert(1, myAssemblyInstaller);

// Copy the installers of 'myTransactedInstaller1' // to 'myTransactedInstaller2'. myTransactedInstaller2.get_Installers(). AddRange(myTransactedInstaller1.get_Installers());

.NET Framework のセキュリティ.NET Frameworkセキュリティ

プラットフォームプラットフォーム

バージョン情報バージョン情報

参照参照

関連項目
InstallerCollection クラス
InstallerCollection メンバ
System.Configuration.Install 名前空間