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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
            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);
                }
            }
Exemple #4
0
        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());
 }
Exemple #7
0
 private object NotHandledConversion(object objIn, rdtSerializerRegistry r)
 {
     return(null);
 }
Exemple #8
0
 public object Deserialize(rdtSerializerRegistry registry)
 {
     return(this);
 }