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

◆ GenerateSupportedTypes()

void System.Xml.Serialization.XmlSerializationILGen.GenerateSupportedTypes ( Type[] types,
TypeBuilder serializerContractTypeBuilder )
inlinepackageinherited

Definition at line 242 of file XmlSerializationILGen.cs.

243 {
244 ilg = new CodeGenerator(serializerContractTypeBuilder);
245 ilg.BeginMethod(typeof(bool), "CanSerialize", new Type[1] { typeof(Type) }, new string[1] { "type" }, MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig);
247 foreach (Type type in types)
248 {
249 if (!(type == null) && (type.IsPublic || type.IsNestedPublic) && hashSet.Add(type) && !type.IsGenericType && !type.ContainsGenericParameters)
250 {
251 ilg.Ldarg("type");
252 ilg.Ldc(type);
253 ilg.If(Cmp.EqualTo);
256 ilg.EndIf();
257 }
258 }
261 ilg.EndMethod();
262 }
void Add(TKey key, TValue value)
void BeginMethod(Type returnType, string methodName, Type[] argTypes, string[] argNames, MethodAttributes methodAttributes)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Serialization.CodeGenerator.BeginMethod(), System.Xml.Dictionary, System.Xml.Serialization.CodeGenerator.EndIf(), System.Xml.Serialization.CodeGenerator.EndMethod(), System.Xml.Serialization.CodeGenerator.GotoMethodEnd(), System.Xml.Serialization.CodeGenerator.If(), System.Xml.Serialization.XmlSerializationILGen.ilg, System.Xml.Serialization.CodeGenerator.Ldarg(), System.Xml.Serialization.CodeGenerator.Ldc(), and System.type.