public object Deserialize(rdtSerializerRegistry registry) { Array array = Array.CreateInstance(this.m_type, this.m_objects.Count); for (int i = 0; i < this.m_objects.Count; i++) { array.SetValue(registry.Deserialize(this.m_objects[i]), i); } return(array); }
public object Deserialize(rdtSerializerRegistry registry) { IList list = (IList)typeof(List <>).MakeGenericType(new System.Type[] { this.m_type }).GetConstructor(System.Type.EmptyTypes).Invoke(null); foreach (object obj2 in this.m_objects) { object obj3 = registry.Deserialize(obj2); list.Add(obj3); } return(list); }
public void Deserialise(rdtSerializerRegistry registry) { List <rdtTcpMessageComponents.Property> list = this.m_value as List <rdtTcpMessageComponents.Property>; if (list != null) { for (int i = 0; i < list.Count; i++) { list[i].Deserialise(registry); } } else { this.m_value = registry.Deserialize(this.m_value); } }
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); }
public object Deserialize(rdtSerializerRegistry registry) { return(this.ToUnityType()); }
private object NotHandledConversion(object objIn, rdtSerializerRegistry r) { return(null); }
public object Deserialize(rdtSerializerRegistry registry) { return(this); }