本文整理汇总了C#中Microsoft.Tools.WindowsInstallerXml.Msi.Database.CreateTransformSummaryInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Database.CreateTransformSummaryInfo方法的具体用法?C# Database.CreateTransformSummaryInfo怎么用?C# Database.CreateTransformSummaryInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Tools.WindowsInstallerXml.Msi.Database
的用法示例。
在下文中一共展示了Database.CreateTransformSummaryInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindTransform
//.........这里部分代码省略.........
}
targetRow[i] = emptyFile;
modifiedRow = true;
}
else if (!this.FileManager.CompareFiles(objectField.PreviousData, (string)objectField.Data))
{
targetRow[i] = objectField.PreviousData;
modifiedRow = true;
}
}
else // unmodified
{
if (null != updatedField.Data)
{
targetRow[i] = updatedField.Data;
}
}
}
// modified rows and certain special rows go in the target and updated msi databases
if (modifiedRow ||
("Property" == table.Name &&
("ProductCode" == (string)row[0] ||
"ProductLanguage" == (string)row[0] ||
"ProductVersion" == (string)row[0] ||
"UpgradeCode" == (string)row[0])))
{
Table targetTable = targetOutput.EnsureTable(table.Definition);
targetTable.Rows.Add(targetRow);
Table updatedTable = updatedOutput.EnsureTable(table.Definition);
updatedTable.Rows.Add(updatedRow);
}
}
}
foreach (BinderExtension extension in this.extensions)
{
extension.TransformFinalize(transform);
}
// Any errors encountered up to this point can cause errors during generation.
if (this.core.EncounteredError)
{
return false;
}
string transformFileName = Path.GetFileNameWithoutExtension(transformFile);
string targetDatabaseFile = Path.Combine(this.TempFilesLocation, String.Concat(transformFileName, "_target.msi"));
string updatedDatabaseFile = Path.Combine(this.TempFilesLocation, String.Concat(transformFileName, "_updated.msi"));
this.suppressAddingValidationRows = true;
this.GenerateDatabase(targetOutput, targetDatabaseFile, false, true);
this.GenerateDatabase(updatedOutput, updatedDatabaseFile, true, true);
// make sure the directory exists
Directory.CreateDirectory(Path.GetDirectoryName(transformFile));
// create the transform file
using (Database targetDatabase = new Database(targetDatabaseFile, OpenDatabase.ReadOnly))
{
using (Database updatedDatabase = new Database(updatedDatabaseFile, OpenDatabase.ReadOnly))
{
// Skip adding the patch transform if the product transform was empty.
// Patch transforms are usually not empty due to changes such as Media Table Row insertions.
if ((this.AllowEmptyTransforms && this.emptyTransformNames.Contains(transformFileName.Replace("#", ""))) || !updatedDatabase.GenerateTransform(targetDatabase, transformFile))
{
if (this.AllowEmptyTransforms)
{
// Only output the message once for the product transform.
if (!transformFileName.StartsWith("#"))
{
this.core.OnMessage(WixWarnings.NoDifferencesInTransform(transform.SourceLineNumbers));
}
this.emptyTransformNames.Add(transformFileName);
return false;
}
else
{
throw new WixException(WixErrors.NoDifferencesInTransform(transform.SourceLineNumbers));
}
}
else
{
if (targetProductCode != null && !this.nonEmptyProductCodes.Contains(targetProductCode))
{
this.nonEmptyProductCodes.Add(targetProductCode);
}
if (!this.nonEmptyTransformNames.Contains(":" + transformFileName))
{
this.nonEmptyTransformNames.Add(":" + transformFileName);
}
updatedDatabase.CreateTransformSummaryInfo(targetDatabase, transformFile, (TransformErrorConditions)(transformFlags & 0xFFFF), (TransformValidations)((transformFlags >> 16) & 0xFFFF));
}
}
}
return !this.core.EncounteredError;
}