本文整理汇总了C#中BundleInstaller类的典型用法代码示例。如果您正苦于以下问题:C#BundleInstaller类的具体用法?C#BundleInstaller怎么用?C#BundleInstaller使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:Burn_PermanentInstallUninstall
publicvoidBurn_PermanentInstallUninstall()
{
//Buildthepackages.
stringpackageA=newPackageBuilder(this,"A"){Extensions=Extensions}.Build().Output;
stringpackageB=newPackageBuilder(this,"B"){Extensions=Extensions}.Build().Output;
//Createthenamedbindpathstothepackages.
Dictionary
bindPaths=newDictionary();
bindPaths.Add("packageA",packageA);
bindPaths.Add("packageB",packageB);
//Buildthebundles.
stringbundleA=newBundleBuilder(this,"BundleA"){BindPaths=bindPaths,Extensions=Extensions}.Build().Output;
//InstallBundleA.
BundleInstallerinstallerA=newBundleInstaller(this,bundleA).Install();
Assert.True(MsiVerifier.IsPackageInstalled(packageA));
Assert.True(MsiVerifier.IsPackageInstalled(packageB));
//UninstallbundleA.
installerA.Uninstall();
Assert.True(MsiVerifier.IsPackageInstalled(packageA));
Assert.False(MsiVerifier.IsPackageInstalled(packageB));
this.Complete();
}
原文链接:http://www.jxszl.com/biancheng/C/556611.html