public WixXmlAttribute(string name, string value, WixXmlAttributeType type, string[] values, WixDocument document) { this.name = name; attributeValue = value; this.type = type; this.values = values; this.document = document; }
/// <summary> /// Gets the attributes for the specified element. Also adds any standard /// attributes for the element which are not set. /// </summary> public WixXmlAttributeCollection GetAttributes(XmlElement element) { WixXmlAttributeCollection attributes = new WixXmlAttributeCollection(); string elementName = element.Name; foreach (XmlAttribute attribute in element.Attributes) { string attributeName = attribute.Name; WixXmlAttributeType type = GetWixAttributeType(elementName, attributeName); WixDocument document = GetWixDocument(element); string[] attributeValues = GetAttributeValues(elementName, attributeName); WixXmlAttribute wixAttribute = new WixXmlAttribute(attributeName, attribute.Value, type, attributeValues, document); attributes.Add(wixAttribute); } attributes.AddRange(GetMissingAttributes(element, attributes, GetAttributeNames(elementName))); return(attributes); }
/// <summary> /// Gets the attributes that have not been added to the /// <paramref name="attributes"/>. /// </summary> WixXmlAttributeCollection GetMissingAttributes(XmlElement element, WixXmlAttributeCollection existingAttributes, string[] attributes) { WixXmlAttributeCollection missingAttributes = new WixXmlAttributeCollection(); foreach (string name in attributes) { if (existingAttributes[name] == null) { string elementName = element.Name; WixXmlAttributeType type = GetWixAttributeType(elementName, name); string[] attributeValues = GetAttributeValues(elementName, name); WixDocument document = GetWixDocument(element); missingAttributes.Add(new WixXmlAttribute(name, type, attributeValues, document)); } } return(missingAttributes); }
public WixXmlAttribute(string name, WixXmlAttributeType type, string[] values, WixDocument document) : this(name, String.Empty, type, values, document) { }
public WixXmlAttribute(string name, WixXmlAttributeType type) : this(name, String.Empty, type, new string[0], null) { }
public WixXmlAttribute(string name, string value, WixXmlAttributeType type) : this(name, value, type, new string[0], null) { }