public void Uuid()
		{
			WixXmlAttribute attribute = new WixXmlAttribute("Id", WixXmlAttributeType.Guid);
			propertyDescriptor = new WixXmlAttributePropertyDescriptor(attribute);
			EditorAttribute editorAttribute = WixBindingTestsHelper.GetEditorAttribute(propertyDescriptor.Attributes);
			
			Assert.IsNotNull(editorAttribute);
			Assert.AreEqual(typeof(GuidEditor).AssemblyQualifiedName, editorAttribute.EditorTypeName);
		}
예제 #2
0
 IEnumerable <string> GetDropDownItems(ITypeDescriptorContext context)
 {
     if (context != null)
     {
         WixXmlAttributePropertyDescriptor propertyDescriptor = context.PropertyDescriptor as WixXmlAttributePropertyDescriptor;
         if (propertyDescriptor != null && propertyDescriptor.WixXmlAttribute.HasValues)
         {
             return(propertyDescriptor.WixXmlAttribute.Values);
         }
     }
     return(new string[0]);
 }
예제 #3
0
        /// <summary>
        /// Gets the Wix document associated with the property
        /// descriptor.
        /// </summary>
        WixDocument GetWixDocument(ITypeDescriptorContext context)
        {
            WixDocument document = null;

            if (context != null)
            {
                WixXmlAttributePropertyDescriptor propertyDescriptor = context.PropertyDescriptor as WixXmlAttributePropertyDescriptor;
                if (propertyDescriptor != null)
                {
                    document = propertyDescriptor.WixXmlAttribute.Document;
                }
            }

            if (document != null)
            {
                return(document);
            }
            return(new WixDocument());
        }
		public void SetUpFixture()
		{
			WixXmlAttribute attribute = new WixXmlAttribute("Id", WixXmlAttributeType.Text, new string[] {"a", "b"}, null);
			propertyDescriptor = new WixXmlAttributePropertyDescriptor(attribute);
			editorAttribute = WixBindingTestsHelper.GetEditorAttribute(propertyDescriptor.Attributes);
		}
 public WixXmlAttributeTypeDescriptor(IList wixXmlAttributes)
 {
     properties = WixXmlAttributePropertyDescriptor.GetProperties(wixXmlAttributes);
 }
		public void SetUpFixture()
		{
			WixXmlAttribute attribute = new WixXmlAttribute("Id", WixXmlAttributeType.ComponentGuid);
			propertyDescriptor = new WixXmlAttributePropertyDescriptor(attribute);
			editorAttribute = WixBindingTestsHelper.GetEditorAttribute(propertyDescriptor.Attributes);
		}
		public void Setup()
		{
			wixXmlAttribute = new WixXmlAttribute("LongName", "InitialValue", WixXmlAttributeType.Text);
			pd = new WixXmlAttributePropertyDescriptor(wixXmlAttribute);
		}