本文整理汇总了C#中ComplexReferenceParentType类 的典型用法代码示例。如果您正苦于以下问题:C# ComplexReferenceParentType类的具体用法?C# ComplexReferenceParentType怎么用?C# ComplexReferenceParentType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComplexReferenceParentType类 属于命名空间,在下文中一共展示了ComplexReferenceParentType类 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ParsePackageGroupRefElement
/// <summary>
/// Parses a package group reference element.
/// </summary>
/// <param name="node">Element to parse.</param>
/// <param name="parentType">ComplexReferenceParentType of parent element (Unknown or PackageGroup).</param>
/// <param name="parentId">Identifier of parent element.</param>
/// <returns>Identifier for package group element.</rereturns>
private string ParsePackageGroupRefElement(XmlNode node, ComplexReferenceParentType parentType, string parentId)
{
return ParsePackageGroupRefElement(node, parentType, parentId, ComplexReferenceChildType.PackageGroup, null);
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:11, 代码来源:Compiler.cs
示例2: CreateWixComplexReferenceRow
/// <summary>
/// Creates a WiX complex reference in the active section.
/// </summary>
/// <param name="sourceLineNumbers">Source line information.</param>
/// <param name="parentType">The parent type.</param>
/// <param name="parentId">The parent id.</param>
/// <param name="parentLanguage">The parent language.</param>
/// <param name="childType">The child type.</param>
/// <param name="childId">The child id.</param>
/// <param name="isPrimary">Whether the child is primary.</param>
internal void CreateWixComplexReferenceRow(SourceLineNumberCollection sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary)
{
if (!this.EncounteredError)
{
WixComplexReferenceRow wixComplexReferenceRow = (WixComplexReferenceRow)this.CreateRow(sourceLineNumbers, "WixComplexReference");
wixComplexReferenceRow.ParentId = parentId;
wixComplexReferenceRow.ParentType = parentType;
wixComplexReferenceRow.ParentLanguage = parentLanguage;
wixComplexReferenceRow.ChildId = childId;
wixComplexReferenceRow.ChildType = childType;
wixComplexReferenceRow.IsPrimary = isPrimary;
}
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:23, 代码来源:CompilerCore.cs
示例3: ParseChainPackage
/// <summary>
/// Parses one of the ChainPackage elements
/// </summary>
/// <param name="node">Element to parse</param>
/// <param name="packageType">Type of package to parse</param>
/// <param name="parentType">Type of parent group, if known.</param>
/// <param name="parentId">Identifier of parent group, if known.</param>
/// <param name="previousType">Type of previous item, if known.</param>
/// <param name="previousId">Identifier of previous item, if known</param>
/// <returns>Identifier for package element.</returns>
/// <remarks>This method contains the shared logic for parsing all of the ChainPackage
/// types, as there is more in common between them than different.</remarks>
private string ParseChainPackage(XmlNode node, ChainPackageType packageType, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId)
{
Debug.Assert(ComplexReferenceParentType.PackageGroup == parentType);
Debug.Assert(ComplexReferenceChildType.Unknown == previousType || ComplexReferenceChildType.PackageGroup == previousType || ComplexReferenceChildType.Package == previousType);
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
string name = null;
string sourceFile = null;
string downloadUrl = null;
string id = null;
string after = null;
string installCondition = null;
YesNoType cache = YesNoType.NotSet;
string cacheId = null;
string description = null;
string displayName = null;
string logPathVariable = (packageType == ChainPackageType.Msu) ? String.Empty : null;
string rollbackPathVariable = (packageType == ChainPackageType.Msu) ? String.Empty : null;
YesNoType permanent = YesNoType.NotSet;
YesNoType visible = YesNoType.NotSet;
YesNoType vital = YesNoType.Yes;
string installCommand = null;
string repairCommand = null;
YesNoType repairable = YesNoType.NotSet;
string uninstallCommand = null;
YesNoDefaultType perMachine = YesNoDefaultType.NotSet;
string detectCondition = null;
string protocol = null;
int installSize = CompilerCore.IntegerNotSet;
string msuKB = null;
YesNoType suppressLooseFilePayloadGeneration = YesNoType.NotSet;
YesNoType suppressSignatureVerification = YesNoType.NotSet;
YesNoDefaultType compressed = YesNoDefaultType.Default;
YesNoType displayInternalUI = YesNoType.NotSet;
YesNoType enableFeatureSelection = YesNoType.NotSet;
YesNoType forcePerMachine = YesNoType.NotSet;
BundlePackageAttributes attributes = BundlePackageAttributes.None;
PayloadInfoRow remotePayload = null;
YesNoType slipstream = YesNoType.NotSet;
string[] expectedNetFx4Args = new string[] { "/q", "/norestart", "/chainingpackage" };
// This crazy list lets us evaluate extension attributes *after* all core attributes
// have been parsed and dealt with, regardless of authoring order.
List<KeyValuePair<SourceLineNumberCollection, XmlAttribute>> extensionAttributes =
new List<KeyValuePair<SourceLineNumberCollection, XmlAttribute>>();
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
bool allowed = true;
switch (attrib.LocalName)
{
case "Name":
name = this.core.GetAttributeLongFilename(sourceLineNumbers, attrib, false, true);
if (!CompilerCore.IsValidLongFilename(name, false, true))
{
this.core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name, "Name", name));
}
break;
case "SourceFile":
sourceFile = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "DownloadUrl":
downloadUrl = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Id":
id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
break;
case "After":
after = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "InstallCondition":
installCondition = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Cache":
cache = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
break;
case "CacheId":
cacheId = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Description":
description = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "DisplayName":
displayName = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
//.........这里部分代码省略.........
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:101, 代码来源:Compiler.cs
示例4: ParsePatchFamilyGroupRefElement
/// <summary>
/// Parses a PatchFamilyGroup reference element.
/// </summary>
/// <param name="node">Element to parse.</param>
/// <param name="parentType">The type of parent.</param>
/// <param name="parentId">Identifier of parent element.</param>
private void ParsePatchFamilyGroupRefElement(XmlNode node, ComplexReferenceParentType parentType, string parentId)
{
Debug.Assert(ComplexReferenceParentType.PatchFamilyGroup == parentType || ComplexReferenceParentType.Patch == parentType);
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
string id = null;
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
switch (attrib.LocalName)
{
case "Id":
id = this.core.GetAttributeValue(sourceLineNumbers, attrib);
this.core.CreateWixSimpleReferenceRow(sourceLineNumbers, "WixPatchFamilyGroup", id);
break;
default:
this.core.UnexpectedAttribute(sourceLineNumbers, attrib);
break;
}
}
else
{
this.core.ParseExtensionAttribute(sourceLineNumbers, (XmlElement)node, attrib);
}
}
if (null == id)
{
this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "Id"));
}
foreach (XmlNode child in node.ChildNodes)
{
if (XmlNodeType.Element == child.NodeType)
{
if (child.NamespaceURI == this.schema.TargetNamespace)
{
this.core.UnexpectedElement(node, child);
}
else
{
this.core.UnsupportedExtensionElement(node, child);
}
}
}
if (!this.core.EncounteredError)
{
this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.PatchFamilyGroup, id, true);
}
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:59, 代码来源:Compiler.cs
示例5: ParseFeatureGroupElement
private void ParseFeatureGroupElement(XmlNode node, ComplexReferenceParentType parentType, string parentId)
{
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
string id = null;
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
switch (attrib.LocalName)
{
case "Id":
id = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
default:
this.core.UnexpectedAttribute(sourceLineNumbers, attrib);
break;
}
}
else
{
this.core.ParseExtensionAttribute(sourceLineNumbers, (XmlElement)node, attrib);
}
}
if (null == id)
{
this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "Id"));
}
int lastDisplay = 0;
foreach (XmlNode child in node.ChildNodes)
{
if (XmlNodeType.Element == child.NodeType)
{
if (child.NamespaceURI == this.schema.TargetNamespace)
{
switch (child.LocalName)
{
case "ComponentGroupRef":
this.ParseComponentGroupRefElement(child, ComplexReferenceParentType.FeatureGroup, id, null);
break;
case "ComponentRef":
this.ParseComponentRefElement(child, ComplexReferenceParentType.FeatureGroup, id, null);
break;
case "Component":
this.ParseComponentElement(child, ComplexReferenceParentType.FeatureGroup, id, null, CompilerCore.IntegerNotSet, null, null);
break;
case "Feature":
this.ParseFeatureElement(child, ComplexReferenceParentType.FeatureGroup, id, ref lastDisplay);
break;
case "FeatureGroupRef":
this.ParseFeatureGroupRefElement(child, ComplexReferenceParentType.FeatureGroup, id);
break;
case "FeatureRef":
this.ParseFeatureRefElement(child, ComplexReferenceParentType.FeatureGroup, id);
break;
case "MergeRef":
this.ParseMergeRefElement(child, ComplexReferenceParentType.FeatureGroup, id);
break;
default:
this.core.UnexpectedElement(node, child);
break;
}
}
else
{
this.core.ParseExtensionElement(sourceLineNumbers, (XmlElement)node, (XmlElement)child);
}
}
}
if (!this.core.EncounteredError)
{
Row row = this.core.CreateRow(sourceLineNumbers, "WixFeatureGroup");
row[0] = id;
//Add this FeatureGroup and its parent in WixGroup.
this.core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.FeatureGroup, id);
}
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:81, 代码来源:Compiler.cs
示例6: ParseComponentElement
private string ParseComponentElement(XmlNode node, ComplexReferenceParentType parentType, string parentId, string parentLanguage, int diskId, string directoryId, string srcPath)
{
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
int bits = 0;
int comPlusBits = CompilerCore.IntegerNotSet;
string condition = null;
bool encounteredODBCDataSource = false;
bool explicitWin64 = false;
int files = 0;
string guid = "*";
string autoId = Compiler.DefaultComponentIdPlaceholder; // placeholder id for defaulting Component/@Id to keypath id.
string id = Compiler.DefaultComponentIdPlaceholderWixVariable;
int keyBits = 0;
bool keyFound = false;
string keyPath = null;
bool shouldAddCreateFolder = false;
bool win64 = false;
bool multiInstance = false;
string symbols = null;
string feature = null;
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
switch (attrib.LocalName)
{
case "Id":
id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
break;
case "ComPlusFlags":
comPlusBits = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
break;
case "DisableRegistryReflection":
if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
bits |= MsiInterop.MsidbComponentAttributesDisableRegistryReflection;
}
break;
case "Directory":
if (null != directoryId)
{
this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name, attrib.Name, "Directory"));
}
directoryId = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
this.core.CreateWixSimpleReferenceRow(sourceLineNumbers, "Directory", directoryId);
break;
case "DiskId":
diskId = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
break;
case "Feature":
feature = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
break;
case "Guid":
guid = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, true, true);
break;
case "KeyPath":
if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
keyFound = true;
keyPath = null;
keyBits = 0;
shouldAddCreateFolder = true;
}
break;
case "Location":
string location = this.core.GetAttributeValue(sourceLineNumbers, attrib);
if (0 < location.Length)
{
Wix.Component.LocationType locationType = Wix.Component.ParseLocationType(location);
switch (locationType)
{
case Wix.Component.LocationType.either:
bits |= MsiInterop.MsidbComponentAttributesOptional;
break;
case Wix.Component.LocationType.local: // this is the default
break;
case Wix.Component.LocationType.source:
bits |= MsiInterop.MsidbComponentAttributesSourceOnly;
break;
default:
this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name, attrib.Name, "either", "local", "source"));
break;
}
}
break;
case "MultiInstance":
multiInstance = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
break;
case "NeverOverwrite":
if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
bits |= MsiInterop.MsidbComponentAttributesNeverOverwrite;
}
break;
case "Permanent":
if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
bits |= MsiInterop.MsidbComponentAttributesPermanent;
//.........这里部分代码省略.........
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:101, 代码来源:Compiler.cs
示例7: ParseComponentGroupRefElement
/// <summary>
/// Parses a component group reference element.
/// </summary>
/// <param name="node">Element to parse.</param>
/// <param name="parentType">ComplexReferenceParentType of parent element.</param>
/// <param name="parentId">Identifier of parent element (usually a Feature or Module).</param>
/// <param name="parentLanguage">Optional language of parent (only useful for Modules).</param>
private void ParseComponentGroupRefElement(XmlNode node, ComplexReferenceParentType parentType, string parentId, string parentLanguage)
{
Debug.Assert(ComplexReferenceParentType.ComponentGroup == parentType || ComplexReferenceParentType.FeatureGroup == parentType || ComplexReferenceParentType.Feature == parentType || ComplexReferenceParentType.Module == parentType);
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
string id = null;
YesNoType primary = YesNoType.NotSet;
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
switch (attrib.LocalName)
{
case "Id":
id = this.core.GetAttributeValue(sourceLineNumbers, attrib);
if (!CompilerCore.IsIdentifier(id))
{
this.core.OnMessage(WixWarnings.DeprecatedComponentGroupId(sourceLineNumbers, node.LocalName));
}
this.core.CreateWixSimpleReferenceRow(sourceLineNumbers, "WixComponentGroup", id);
break;
case "Primary":
primary = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
break;
default:
this.core.UnexpectedAttribute(sourceLineNumbers, attrib);
break;
}
}
else
{
this.core.ParseExtensionAttribute(sourceLineNumbers, (XmlElement)node, attrib);
}
}
if (null == id)
{
this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "Id"));
}
foreach (XmlNode child in node.ChildNodes)
{
if (XmlNodeType.Element == child.NodeType)
{
if (child.NamespaceURI == this.schema.TargetNamespace)
{
this.core.UnexpectedElement(node, child);
}
else
{
this.core.UnsupportedExtensionElement(node, child);
}
}
}
this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.ComponentGroup, id, (YesNoType.Yes == primary));
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:66, 代码来源:Compiler.cs
示例8: ParsePayloadElement
/// <summary>
/// Parse Payload element.
/// </summary>
/// <param name="node">Element to parse</param>
/// <param name="parentType">ComplexReferenceParentType of parent element. (BA or PayloadGroup)</param>
/// <param name="parentId">Identifier of parent element.</param>
private string ParsePayloadElement(XmlNode node, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId)
{
Debug.Assert(ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType);
Debug.Assert(ComplexReferenceChildType.Unknown == previousType || ComplexReferenceChildType.PayloadGroup == previousType || ComplexReferenceChildType.Payload == previousType);
string id = ParsePayloadElementContent(node, parentType, parentId, previousType, previousId, true);
foreach (XmlNode child in node.ChildNodes)
{
if (XmlNodeType.Element == child.NodeType)
{
if (child.NamespaceURI == this.schema.TargetNamespace)
{
switch (child.LocalName)
{
default:
this.core.UnexpectedElement(node, child);
break;
}
}
else
{
this.core.UnsupportedExtensionElement(node, child);
}
}
}
return id;
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:35, 代码来源:Compiler.cs
示例9: ParsePayloadElementContent
/// <summary>
/// Parse the attributes of the Payload element.
/// </summary>
/// <param name="node">Element to parse</param>
/// <param name="parentType">ComplexReferenceParentType of parent element.</param>
/// <param name="parentId">Identifier of parent element.</param>
private string ParsePayloadElementContent(XmlNode node, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId, bool required)
{
Debug.Assert(ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType);
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
YesNoDefaultType compressed = YesNoDefaultType.Default;
YesNoType suppressSignatureVerification = YesNoType.NotSet;
string id = null;
string name = null;
string sourceFile = null;
string downloadUrl = null;
PayloadInfoRow remotePayload = null;
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
switch (attrib.LocalName)
{
case "Id":
id = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Compressed":
compressed = this.core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
break;
case "Name":
name = this.core.GetAttributeLongFilename(sourceLineNumbers, attrib, false, true);
break;
case "SourceFile":
sourceFile = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "DownloadUrl":
downloadUrl = this.core.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "SuppressSignatureVerification":
suppressSignatureVerification = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
break;
default:
this.core.UnexpectedAttribute(sourceLineNumbers, attrib);
break;
}
}
else
{
this.core.UnsupportedExtensionAttribute(sourceLineNumbers, attrib);
}
}
if (!required && null == sourceFile)
{
// Nothing left to do!
return null;
}
foreach (XmlNode child in node.ChildNodes)
{
// We only handle the elements we care about. Let caller handle other children.
if ((XmlNodeType.Element == child.NodeType) && (child.NamespaceURI == this.schema.TargetNamespace) && (child.LocalName == "RemotePayload"))
{
SourceLineNumberCollection childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
if (node.NamespaceURI == this.schema.TargetNamespace && node.LocalName != "ExePackage")
{
this.core.OnMessage(WixErrors.RemotePayloadUnsupported(childSourceLineNumbers));
continue;
}
if (null != remotePayload)
{
this.core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name, child.LocalName));
}
remotePayload = this.ParseRemotePayloadElement(child, id);
}
}
if (null != sourceFile && null != remotePayload)
{
this.core.OnMessage(WixErrors.UnexpectedElementWithAttribute(sourceLineNumbers, node.Name, "RemotePayload", "SourceFile"));
}
else if (null == sourceFile && null == remotePayload)
{
this.core.OnMessage(WixErrors.ExpectedAttributeOrElement(sourceLineNumbers, node.Name, "SourceFile", "RemotePayload"));
}
else if (null == sourceFile)
{
sourceFile = String.Empty;
}
if (null == downloadUrl && null != remotePayload)
{
this.core.OnMessage(WixErrors.ExpectedAttributeWithElement(sourceLineNumbers, node.Name, "DownloadUrl", "RemotePayload"));
}
//.........这里部分代码省略.........
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:101, 代码来源:Compiler.cs
示例10: CombineTypeAndId
private string CombineTypeAndId(ComplexReferenceParentType type, string id)
{
return String.Format("{0}:{1}", type.ToString(), id);
}
开发者ID:zooba, 项目名称:wix3, 代码行数:4, 代码来源:Linker.cs
示例11: ParsePatchFamilyElement
/// <summary>
/// Parses a PatchFamily element.
/// </summary>
/// <param name="node">The element to parse.</param>
private void ParsePatchFamilyElement(XmlNode node, ComplexReferenceParentType parentType, string parentId)
{
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
string id = null;
string productCode = null;
string version = null;
int attributes = 0;
foreach (XmlAttribute attrib in node.Attributes)
{
if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace)
{
switch (attrib.LocalName)
{
case "Id":
id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
break;
case "ProductCode":
productCode = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
break;
case "Version":
version = this.core.GetAttributeVersionValue(sourceLineNumbers, attrib, false);
break;
case "Supersede":
if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
attributes |= 0x1;
}
break;
default:
this.core.UnexpectedAttribute(sourceLineNumbers, attrib);
break;
}
}
else
{
this.core.UnsupportedExtensionAttribute(sourceLineNumbers, attrib);
}
}
if (null == id)
{
this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "Id"));
}
if (String.IsNullOrEmpty(version))
{
this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "Version"));
}
else if (!CompilerCore.IsValidProductVersion(version))
{
this.core.OnMessage(WixErrors.InvalidProductVersion(sourceLineNumbers, version));
}
// find unexpected child elements
foreach (XmlNode child in node.ChildNodes)
{
if (XmlNodeType.Element == child.NodeType)
{
if (child.NamespaceURI == this.schema.TargetNamespace)
{
switch (child.LocalName)
{
case "BinaryRef":
this.ParsePatchChildRefElement(child, "Binary");
break;
case "ComponentRef":
this.ParsePatchChildRefElement(child, "Component");
break;
case "CustomActionRef":
this.ParsePatchChildRefElement(child, "CustomAction");
break;
case "DirectoryRef":
this.ParsePatchChildRefElement(child, "Directory");
break;
case "DigitalCertificateRef":
this.ParsePatchChildRefElement(child, "MsiDigitalCertificate");
break;
case "FeatureRef":
this.ParsePatchChildRefElement(child, "Feature");
break;
case "IconRef":
this.ParsePatchChildRefElement(child, "Icon");
break;
case "PropertyRef":
this.ParsePatchChildRefElement(child, "Property");
break;
case "UIRef":
this.ParsePatchChildRefElement(child, "WixUI");
break;
default:
this.core.UnexpectedElement(node, child);
break;
}
}
else
//.........这里部分代码省略.........
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:101, 代码来源:Compiler.cs
示例12: CreateWixGroupRow
/// <summary>
/// A row in the WixGroup table is added for this child node and its parent node.
/// </summary>
/// <param name="sourceLineNumbers">Source line information for the row.</param>
/// <param name="parentType">Type of child's complex reference parent.</param>
/// <param name="parentId">Id of the parenet node.</param>
/// <param name="childType">Complex reference type of child</param>
/// <param name="childId">Id of the Child Node.</param>
public void CreateWixGroupRow(SourceLineNumberCollection sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
{
if (!this.EncounteredError)
{
if (null == parentId || ComplexReferenceParentType.Unknown == parentType)
{
return;
}
if (null == childId)
{
throw new ArgumentNullException("childId");
}
Row WixGroupRow = this.CreateRow(sourceLineNumbers, "WixGroup");
WixGroupRow[0] = parentId;
WixGroupRow[1] = Enum.GetName(typeof(ComplexReferenceParentType), parentType);
WixGroupRow[2] = childId;
WixGroupRow[3] = Enum.GetName(typeof(ComplexReferenceChildType), childType);
}
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:29, 代码来源:CompilerCore.cs
示例13: CreateComplexReference
/// <summary>
/// Creates WixComplexReference and WixGroup rows in the active section.
/// </summary>
/// <param name="sourceLineNumbers">Source line information.</param>
/// <param name="parentType">The parent type.</param>
/// <param name="parentId">The parent id.</param>
/// <param name="parentLanguage">The parent language.</param>
/// <param name="childType">The child type.</param>
/// <param name="childId">The child id.</param>
/// <param name="isPrimary">Whether the child is primary.</param>
public void CreateComplexReference(SourceLineNumberCollection sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary)
{
this.CreateWixComplexReferenceRow(sourceLineNumbers, parentType, parentId, parentLanguage, childType, childId, isPrimary);
this.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, childType, childId);
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:15, 代码来源:CompilerCore.cs
示例14: CreatePayloadRow
/// <summary>
/// Creates the row for a Payload.
/// </summary>
/// <param name="node">Element to parse</param>
/// <param name="parentType">ComplexReferenceParentType of parent element</param>
/// <param name="parentId">Identifier of parent element.</param>
private void CreatePayloadRow(SourceLineNumberCollection sourceLineNumbers, string id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType,
string parentId, ComplexReferenceChildType previousType, string previousId, YesNoDefaultType compressed, YesNoType suppressSignatureVerification, string displayName, string description)
{
if (!this.core.EncounteredError)
{
Row row = this.core.CreateRow(sourceLineNumbers, "Payload");
row[0] = id;
row[1] = String.IsNullOrEmpty(name) ? Path.GetFileName(sourceFile) : name;
row[2] = sourceFile;
row[3] = downloadUrl;
if (YesNoDefaultType.Default != compressed)
{
row[4] = (YesNoDefaultType.Yes == compressed) ? 1 : 0;
}
row[5] = sourceFile; // duplicate of sourceFile but in a string column so it won't get resolved to a full path during binding.
row[6] = (YesNoType.Yes == suppressSignatureVerification) ? 1 : 0;
if (!String.IsNullOrEmpty(description) || !String.IsNullOrEmpty(displayName))
{
Row rowDisplay = this.core.CreateRow(sourceLineNumbers, "PayloadDisplayInformation");
rowDisplay[0] = id;
rowDisplay[1] = displayName;
rowDisplay[2] = description;
}
this.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.Payload, id, previousType, previousId);
}
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:34, 代码来源:Compiler.cs
示例15: CreateChainPackageMetaRows
/// <summary>
/// Creates group and ordering information for packages
/// </summary>
/// <param name="sourceLineNumbers">Source line numbers.</param>
/// <param name="parentType">Type of parent group, if known.</param>
/// <param name="parentId">Identifier of parent group, if known.</param>
/// <param name="type">Type of this item.</param>
/// <param name="id">Identifier for this item.</param>
/// <param name="previousType">Type of previous item, if known.</param>
/// <param name="previousId">Identifier of previous item, if known</param>
/// <param name="afterId">Identifier of explicit 'After' attribute, if given.</param>
private void CreateChainPackageMetaRows(SourceLineNumberCollection sourceLineNumbers,
ComplexReferenceParentType parentType, string parentId,
ComplexReferenceChildType type, string id,
ComplexReferenceChildType previousType, string previousId, string afterId)
{
// If there's an explicit 'After' attribute, it overrides the inferred previous item.
if (null != afterId)
{
previousType = ComplexReferenceChildType.Package;
previousId = afterId;
}
this.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId, type, id, previousType, previousId);
}
开发者ID:Jeremiahf, 项目名称:wix3, 代码行数:25, 代码来源:Compiler.cs
示例16: ParsePayloadGroupElement
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19193| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9988| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8327| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8696| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8639| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9657| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8624| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7998| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8656| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7535| 2022-11-06
请发表评论