Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InitializeTabClasses()

void System.ComponentModel.PropertyTabAttribute.InitializeTabClasses ( )
inlineprivate

Definition at line 68 of file PropertyTabAttribute.cs.

69 {
70 _tabClasses = new Type[_tabClassNames.Length];
71 for (int i = 0; i < _tabClassNames.Length; i++)
72 {
73 int num = _tabClassNames[i].IndexOf(',');
74 string text = null;
75 string text2 = null;
76 if (num != -1)
77 {
78 text = _tabClassNames[i].AsSpan(0, num).Trim().ToString();
79 text2 = _tabClassNames[i].AsSpan(num + 1).Trim().ToString();
80 }
81 else
82 {
84 }
85 _tabClasses[i] = Type.GetType(text, throwOnError: false);
86 if (_tabClasses[i] == null)
87 {
88 if (text2 == null)
89 {
90 throw new TypeLoadException(System.SR.Format(System.SR.PropertyTabAttributeTypeLoadException, text));
91 }
92 Assembly assembly = Assembly.Load(text2);
93 if (assembly != null)
94 {
95 _tabClasses[i] = assembly.GetType(text, throwOnError: true);
96 }
97 }
98 }
99 }
static Assembly Load(string assemblyString)
Definition Assembly.cs:157
virtual ? Type GetType(string name)
Definition Assembly.cs:305
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string PropertyTabAttributeTypeLoadException
Definition SR.cs:70
Definition SR.cs:7
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408

References System.ComponentModel.PropertyTabAttribute._tabClasses, System.ComponentModel.PropertyTabAttribute._tabClassNames, System.SR.Format(), System.Reflection.Assembly.GetType(), System.Type.GetType(), System.Reflection.Assembly.Load(), System.SR.PropertyTabAttributeTypeLoadException, and System.text.