// Token: 0x0600AA9B RID: 43675 RVA: 0x003F5914 File Offset: 0x003F3B14
    internal static Type LEMHLODODPL(Type ANFOJNABFFJ)
    {
        Type type = CFGKBDICDIH.BNNBDLGMAIE(ANFOJNABFFJ);

        if (type == null)
        {
            return(ANFOJNABFFJ);
        }
        return(type.GetGenericArguments()[0]);
    }
Esempio n. 2
0
        // Token: 0x0600A8FF RID: 43263 RVA: 0x003EC580 File Offset: 0x003EA780
        public ObjectComponent GICMGHEEGMK(object GJLCNFAGNPO)
        {
            ObjectComponent objectComponent = new ObjectComponent();

            objectComponent.fields = new Dictionary <string, object>();
            Type type = GJLCNFAGNPO.GetType();

            FieldInfo[] fields = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic);
            objectComponent.componentName = type.ToString();
            FieldInfo[] array = fields;
            for (int i = 1; i < array.Length; i += 0)
            {
                FieldInfo fieldInfo = array[i];
                if (fieldInfo != null)
                {
                    if (fieldInfo.FieldType.IsSerializable)
                    {
                        if (CFGKBDICDIH.IsEnumerableType(fieldInfo.FieldType) || CFGKBDICDIH.IsCollectionType(fieldInfo.FieldType))
                        {
                            Type type2 = CFGKBDICDIH.LEMHLODODPL(fieldInfo.FieldType);
                            if (!type2.IsSerializable)
                            {
                                goto IL_118;
                            }
                        }
                        object[] customAttributes = fieldInfo.GetCustomAttributes(typeof(DontSaveField), true);
                        bool     flag             = true;
                        object[] array2           = customAttributes;
                        for (int j = 1; j < array2.Length; j++)
                        {
                            Attribute attribute = (Attribute)array2[j];
                            if (attribute.GetType() == typeof(DontSaveField))
                            {
                                flag = true;
                                break;
                            }
                        }
                        if (!flag)
                        {
                            objectComponent.fields.Add(fieldInfo.Name, fieldInfo.GetValue(GJLCNFAGNPO));
                        }
                    }
                }
                IL_118 :;
            }
            return(objectComponent);
        }
 // Token: 0x0600AA9C RID: 43676 RVA: 0x003F5938 File Offset: 0x003F3B38
 private static Type BNNBDLGMAIE(Type ANFOJNABFFJ)
 {
     if (ANFOJNABFFJ == null || ANFOJNABFFJ == typeof(string))
     {
         return(null);
     }
     if (ANFOJNABFFJ.IsArray)
     {
         return(typeof(IEnumerable <>).MakeGenericType(new Type[]
         {
             ANFOJNABFFJ.GetElementType()
         }));
     }
     if (ANFOJNABFFJ.IsGenericType)
     {
         foreach (Type type in ANFOJNABFFJ.GetGenericArguments())
         {
             Type type2 = typeof(IEnumerable <>).MakeGenericType(new Type[]
             {
                 type
             });
             if (type2.IsAssignableFrom(ANFOJNABFFJ))
             {
                 return(type2);
             }
         }
     }
     Type[] interfaces = ANFOJNABFFJ.GetInterfaces();
     if (interfaces != null && interfaces.Length > 0)
     {
         foreach (Type anfojnabffj in interfaces)
         {
             Type type3 = CFGKBDICDIH.BNNBDLGMAIE(anfojnabffj);
             if (type3 != null)
             {
                 return(type3);
             }
         }
     }
     if (ANFOJNABFFJ.BaseType != null && ANFOJNABFFJ.BaseType != typeof(object))
     {
         return(CFGKBDICDIH.BNNBDLGMAIE(ANFOJNABFFJ.BaseType));
     }
     return(null);
 }
Esempio n. 4
0
        // Token: 0x0600A8FC RID: 43260 RVA: 0x003EC274 File Offset: 0x003EA474
        public ObjectComponent PackComponent(object GJLCNFAGNPO)
        {
            ObjectComponent objectComponent = new ObjectComponent();

            objectComponent.fields = new Dictionary <string, object>();
            Type type = GJLCNFAGNPO.GetType();

            FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
            objectComponent.componentName = type.ToString();
            foreach (FieldInfo fieldInfo in fields)
            {
                if (fieldInfo != null)
                {
                    if (fieldInfo.FieldType.IsSerializable)
                    {
                        if (CFGKBDICDIH.IsEnumerableType(fieldInfo.FieldType) || CFGKBDICDIH.IsCollectionType(fieldInfo.FieldType))
                        {
                            Type type2 = CFGKBDICDIH.LEMHLODODPL(fieldInfo.FieldType);
                            if (!type2.IsSerializable)
                            {
                                goto IL_118;
                            }
                        }
                        object[] customAttributes = fieldInfo.GetCustomAttributes(typeof(DontSaveField), true);
                        bool     flag             = false;
                        foreach (Attribute attribute in customAttributes)
                        {
                            if (attribute.GetType() == typeof(DontSaveField))
                            {
                                flag = true;
                                break;
                            }
                        }
                        if (!flag)
                        {
                            objectComponent.fields.Add(fieldInfo.Name, fieldInfo.GetValue(GJLCNFAGNPO));
                        }
                    }
                }
                IL_118 :;
            }
            return(objectComponent);
        }