-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.ComponentModellinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework
Milestone
Description
While enabling System.ComponentModel.TypeConverter.Tests on Browser WASM, I faced the failures in System.Xml.Linq.Tests.XTypeDescriptionProviderTests test class.
There are 7 test cases which mostly test the property-related logic for XElement and XAttribute classes (dotnet/corefx#33082).
Those classes are annotated with System.ComponentModel.TypeDescriptionProviderAttribute so that TypeDescriptor.GetProperties() can provide with some additional properties
Lines 36 to 61 in 6072e4d
| public override PropertyDescriptorCollection GetProperties(Attribute[] attributes) | |
| { | |
| PropertyDescriptorCollection properties = new PropertyDescriptorCollection(null); | |
| if (attributes == null) | |
| { | |
| if (typeof(T) == typeof(XElement)) | |
| { | |
| properties.Add(new XElementAttributePropertyDescriptor()); | |
| properties.Add(new XElementDescendantsPropertyDescriptor()); | |
| properties.Add(new XElementElementPropertyDescriptor()); | |
| properties.Add(new XElementElementsPropertyDescriptor()); | |
| properties.Add(new XElementValuePropertyDescriptor()); | |
| properties.Add(new XElementXmlPropertyDescriptor()); | |
| } | |
| else if (typeof(T) == typeof(XAttribute)) | |
| { | |
| properties.Add(new XAttributeValuePropertyDescriptor()); | |
| } | |
| } | |
| foreach (PropertyDescriptor property in base.GetProperties(attributes)) | |
| { | |
| properties.Add(property); | |
| } | |
| return properties; | |
| } | |
| } |
The mentioned tests get a collection of property descriptors by calling something like below
var xel = new XElement("someElement");
var props = TypeDescriptor.GetProperties(xel);
Actually props contains only a collection of some general properties and doesn't include the additional ones.
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.ComponentModellinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework