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

◆ AddImport() [2/2]

void System.Xml.Serialization.Compiler.AddImport ( Type type,
Hashtable types )
inlinepackage

Definition at line 20 of file Compiler.cs.

21 {
22 if (type == null || TypeScope.IsKnownType(type) || types[type] != null)
23 {
24 return;
25 }
26 types[type] = type;
27 Type baseType = type.BaseType;
28 if (baseType != null)
29 {
31 }
32 Type declaringType = type.DeclaringType;
33 if (declaringType != null)
34 {
36 }
37 Type[] interfaces = type.GetInterfaces();
38 foreach (Type type2 in interfaces)
39 {
41 }
42 ConstructorInfo[] constructors = type.GetConstructors();
43 for (int j = 0; j < constructors.Length; j++)
44 {
45 ParameterInfo[] parameters = constructors[j].GetParameters();
46 for (int k = 0; k < parameters.Length; k++)
47 {
48 AddImport(parameters[k].ParameterType, types);
49 }
50 }
51 if (type.IsGenericType)
52 {
53 Type[] genericArguments = type.GetGenericArguments();
54 for (int l = 0; l < genericArguments.Length; l++)
55 {
57 }
58 }
59 Module module = type.Module;
60 Assembly assembly = module.Assembly;
61 if (DynamicAssemblies.IsTypeDynamic(type))
62 {
63 DynamicAssemblies.Add(assembly);
64 return;
65 }
67 if (customAttributes.Length != 0)
68 {
71 }
72 }
static Assembly Load(string assemblyString)
Definition Assembly.cs:157
virtual object[] GetCustomAttributes(bool inherit)
Definition Assembly.cs:332
void AddImport(Type type, Hashtable types)
Definition Compiler.cs:20

References System.Xml.Serialization.DynamicAssemblies.Add(), System.Xml.Serialization.Compiler.AddImport(), System.Type.BaseType, System.Type.DeclaringType, System.Xml.Dictionary, System.Type.GetGenericArguments(), System.Type.GetInterfaces(), System.Xml.Serialization.TypeScope.IsKnownType(), System.Xml.Serialization.DynamicAssemblies.IsTypeDynamic(), System.Reflection.Assembly.Load(), and System.type.

Referenced by System.Xml.Serialization.Compiler.AddImport().