public static object Serialize(object objIn, rdtSerializerRegistry registry) { System.Type type2 = objIn.GetType().GetGenericArguments()[0]; if (type2.IsSerializable && (type2 != typeof(object))) { return(objIn); } ICollection is2 = (ICollection)objIn; rdtSerializerContainerList list = new rdtSerializerContainerList(); foreach (object obj2 in is2) { list.m_objects.Add(registry.Serialize(obj2)); } list.m_type = type2; return(list); }
public static object Serialize(object objIn, rdtSerializerRegistry registry) { System.Type elementType = objIn.GetType().GetElementType(); if (elementType.IsSerializable && (elementType != typeof(object))) { return(objIn); } ICollection is2 = (ICollection)objIn; rdtSerializerContainerArray array = new rdtSerializerContainerArray(); foreach (object obj2 in is2) { array.m_objects.Add(registry.Serialize(obj2)); } array.m_type = elementType; return(array); }