Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CustomTypeDescriptor.cs
Go to the documentation of this file.
2
4
6{
7 private readonly ICustomTypeDescriptor _parent;
8
10 {
11 }
12
14 {
15 _parent = parent;
16 }
17
19 {
20 if (_parent != null)
21 {
22 return _parent.GetAttributes();
23 }
25 }
26
27 public virtual string? GetClassName()
28 {
29 return _parent?.GetClassName();
30 }
31
32 public virtual string? GetComponentName()
33 {
34 return _parent?.GetComponentName();
35 }
36
37 [RequiresUnreferencedCode("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All.")]
38 public virtual TypeConverter GetConverter()
39 {
40 if (_parent != null)
41 {
42 return _parent.GetConverter();
43 }
44 return new TypeConverter();
45 }
46
47 [RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code.")]
49 {
50 return _parent?.GetDefaultEvent();
51 }
52
53 [RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
55 {
57 }
58
59 [RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed.")]
60 public virtual object? GetEditor(Type editorBaseType)
61 {
62 return _parent?.GetEditor(editorBaseType);
63 }
64
66 {
67 if (_parent != null)
68 {
69 return _parent.GetEvents();
70 }
72 }
73
74 [RequiresUnreferencedCode("The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")]
75 public virtual EventDescriptorCollection GetEvents(Attribute[]? attributes)
76 {
77 if (_parent != null)
78 {
79 return _parent.GetEvents(attributes);
80 }
82 }
83
84 [RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
86 {
87 if (_parent != null)
88 {
89 return _parent.GetProperties();
90 }
92 }
93
94 [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.")]
96 {
97 if (_parent != null)
98 {
99 return _parent.GetProperties(attributes);
100 }
102 }
103
104 public virtual object? GetPropertyOwner(PropertyDescriptor? pd)
105 {
106 return _parent?.GetPropertyOwner(pd);
107 }
108}
static readonly AttributeCollection Empty
virtual ? object GetPropertyOwner(PropertyDescriptor? pd)
virtual ? PropertyDescriptor GetDefaultProperty()
virtual EventDescriptorCollection GetEvents()
virtual ? object GetEditor(Type editorBaseType)
virtual EventDescriptorCollection GetEvents(Attribute[]? attributes)
virtual PropertyDescriptorCollection GetProperties(Attribute[]? attributes)
virtual PropertyDescriptorCollection GetProperties()
CustomTypeDescriptor(ICustomTypeDescriptor? parent)
static readonly EventDescriptorCollection Empty
static readonly PropertyDescriptorCollection Empty
object? GetEditor(Type editorBaseType)
object? GetPropertyOwner(PropertyDescriptor? pd)
PropertyDescriptorCollection GetProperties()
EventDescriptorCollection GetEvents()