Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XTypeDescriptor.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.ComponentModel
;
3
using
System.Diagnostics.CodeAnalysis
;
4
using
System.Xml.Linq
;
5
6
namespace
MS.Internal.Xml.Linq.ComponentModel
;
7
8
internal
sealed
class
XTypeDescriptor
<T> :
CustomTypeDescriptor
9
{
10
public
XTypeDescriptor
(
ICustomTypeDescriptor
parent)
11
: base(parent)
12
{
13
}
14
15
[RequiresUnreferencedCode(
"PropertyDescriptor's PropertyType cannot be statically discovered."
)]
16
public
override
PropertyDescriptorCollection
GetProperties
()
17
{
18
return
GetProperties
(
null
);
19
}
20
21
[RequiresUnreferencedCode(
"PropertyDescriptor's PropertyType cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type."
)]
22
public
override
PropertyDescriptorCollection
GetProperties
(
Attribute
[] attributes)
23
{
24
PropertyDescriptorCollection
propertyDescriptorCollection =
new
PropertyDescriptorCollection
(
null
);
25
if
(attributes ==
null
)
26
{
27
if
(typeof(T) == typeof(
XElement
))
28
{
29
propertyDescriptorCollection.
Add
(
new
XElementAttributePropertyDescriptor
());
30
propertyDescriptorCollection.
Add
(
new
XElementDescendantsPropertyDescriptor
());
31
propertyDescriptorCollection.
Add
(
new
XElementElementPropertyDescriptor
());
32
propertyDescriptorCollection.
Add
(
new
XElementElementsPropertyDescriptor
());
33
propertyDescriptorCollection.
Add
(
new
XElementValuePropertyDescriptor
());
34
propertyDescriptorCollection.
Add
(
new
XElementXmlPropertyDescriptor
());
35
}
36
else
if
(typeof(T) == typeof(
XAttribute
))
37
{
38
propertyDescriptorCollection.
Add
(
new
XAttributeValuePropertyDescriptor
());
39
}
40
}
41
foreach
(
PropertyDescriptor
property
in
base.GetProperties(attributes))
42
{
43
propertyDescriptorCollection.Add(property);
44
}
45
return
propertyDescriptorCollection;
46
}
47
}
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor
Definition
XAttributeValuePropertyDescriptor.cs:7
MS.Internal.Xml.Linq.ComponentModel.XElementAttributePropertyDescriptor
Definition
XElementAttributePropertyDescriptor.cs:7
MS.Internal.Xml.Linq.ComponentModel.XElementDescendantsPropertyDescriptor
Definition
XElementDescendantsPropertyDescriptor.cs:8
MS.Internal.Xml.Linq.ComponentModel.XElementElementPropertyDescriptor
Definition
XElementElementPropertyDescriptor.cs:7
MS.Internal.Xml.Linq.ComponentModel.XElementElementsPropertyDescriptor
Definition
XElementElementsPropertyDescriptor.cs:8
MS.Internal.Xml.Linq.ComponentModel.XElementValuePropertyDescriptor
Definition
XElementValuePropertyDescriptor.cs:7
MS.Internal.Xml.Linq.ComponentModel.XElementXmlPropertyDescriptor
Definition
XElementXmlPropertyDescriptor.cs:7
MS.Internal.Xml.Linq.ComponentModel.XTypeDescriptor.GetProperties
override PropertyDescriptorCollection GetProperties()
Definition
XTypeDescriptor.cs:16
MS.Internal.Xml.Linq.ComponentModel.XTypeDescriptor.GetProperties
override PropertyDescriptorCollection GetProperties(Attribute[] attributes)
Definition
XTypeDescriptor.cs:22
MS.Internal.Xml.Linq.ComponentModel.XTypeDescriptor.XTypeDescriptor
XTypeDescriptor(ICustomTypeDescriptor parent)
Definition
XTypeDescriptor.cs:10
MS.Internal.Xml.Linq.ComponentModel.XTypeDescriptor
Definition
XTypeDescriptor.cs:9
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.CustomTypeDescriptor
Definition
CustomTypeDescriptor.cs:6
System.ComponentModel.PropertyDescriptorCollection.Add
int Add(PropertyDescriptor value)
Definition
PropertyDescriptorCollection.cs:245
System.ComponentModel.PropertyDescriptorCollection
Definition
PropertyDescriptorCollection.cs:7
System.ComponentModel.PropertyDescriptor
Definition
PropertyDescriptor.cs:8
System.Xml.Linq.XAttribute
Definition
XAttribute.cs:11
System.Xml.Linq.XElement
Definition
XElement.cs:19
System.ComponentModel.ICustomTypeDescriptor
Definition
ICustomTypeDescriptor.cs:6
MS.Internal.Xml.Linq.ComponentModel
Definition
XAttributeValuePropertyDescriptor.cs:4
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Xml.Linq
Definition
BaseUriAnnotation.cs:1
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.TypeConverter
MS.Internal.Xml.Linq.ComponentModel
XTypeDescriptor.cs
Generated by
1.10.0