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
| publicoverridePropertyDescriptorCollectionGetProperties(Attribute[]attributes) |
| { |
| PropertyDescriptorCollectionproperties=newPropertyDescriptorCollection(null); |
| if(attributes==null) |
| { |
| if(typeof(T)==typeof(XElement)) |
| { |
| properties.Add(newXElementAttributePropertyDescriptor()); |
| properties.Add(newXElementDescendantsPropertyDescriptor()); |
| properties.Add(newXElementElementPropertyDescriptor()); |
| properties.Add(newXElementElementsPropertyDescriptor()); |
| properties.Add(newXElementValuePropertyDescriptor()); |
| properties.Add(newXElementXmlPropertyDescriptor()); |
| } |
| elseif(typeof(T)==typeof(XAttribute)) |
| { |
| properties.Add(newXAttributeValuePropertyDescriptor()); |
| } |
| } |
| foreach(PropertyDescriptorpropertyinbase.GetProperties(attributes)) |
| { |
| properties.Add(property); |
| } |
| returnproperties; |
| } |
| } |
.
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.
While enabling
System.ComponentModel.TypeConverter.Testson 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.TypeDescriptionProviderAttributeso that TypeDescriptor.GetProperties() can provide with some additional propertiesruntime/src/libraries/System.ComponentModel.TypeConverter/src/MS/Internal/Xml/Linq/ComponentModel/XComponentModel.cs
Lines 36 to 61 in 6072e4d
The mentioned tests get a collection of property descriptors by calling something like below
Actually
propscontains only a collection of some general properties and doesn't include the additional ones.