コード例 #1
0
 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;
 }
コード例 #2
0
		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;
		}
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
 public WixXmlAttribute(string name, WixXmlAttributeType type, string[] values, WixDocument document)
     : this(name, String.Empty, type, values, document)
 {
 }
コード例 #6
0
 public WixXmlAttribute(string name, WixXmlAttributeType type)
     : this(name, String.Empty, type, new string[0], null)
 {
 }
コード例 #7
0
 public WixXmlAttribute(string name, string value, WixXmlAttributeType type)
     : this(name, value, type, new string[0], null)
 {
 }
コード例 #8
0
		public WixXmlAttribute(string name, WixXmlAttributeType type, string[] values, WixDocument document)
			: this(name, String.Empty, type, values, document)
		{
		}
コード例 #9
0
		public WixXmlAttribute(string name, WixXmlAttributeType type)
			: this(name, String.Empty, type, new string[0], null)
		{
		}
コード例 #10
0
		public WixXmlAttribute(string name, string value, WixXmlAttributeType type)
			: this(name, value, type, new string[0], null)
		{
		}