Пример #1
0
 // Token: 0x06001790 RID: 6032 RVA: 0x0006FACC File Offset: 0x0006DCCC
 private static void GetChildPrivateProperties(IList <PropertyInfo> initialProperties, Type targetType, BindingFlags bindingAttr)
 {
     while ((targetType = targetType.BaseType) != null)
     {
         PropertyInfo[] properties = targetType.GetProperties(bindingAttr);
         for (int i = 0; i < properties.Length; i++)
         {
             PropertyInfo subTypeProperty2 = properties[i];
             PropertyInfo subTypeProperty  = subTypeProperty2;
             if (!Class_514.IsPublic(subTypeProperty))
             {
                 int num = initialProperties.IndexOf((PropertyInfo p) => p.Name == subTypeProperty.Name);
                 if (num == -1)
                 {
                     initialProperties.Add(subTypeProperty);
                 }
                 else
                 {
                     PropertyInfo property = initialProperties[num];
                     if (!Class_514.IsPublic(property))
                     {
                         initialProperties[num] = subTypeProperty;
                     }
                 }
             }
             else if (!subTypeProperty.IsVirtual())
             {
                 int num2 = initialProperties.IndexOf((PropertyInfo p) => p.Name == subTypeProperty.Name && p.DeclaringType == subTypeProperty.DeclaringType);
                 if (num2 == -1)
                 {
                     initialProperties.Add(subTypeProperty);
                 }
             }
             else
             {
                 int num3 = initialProperties.IndexOf((PropertyInfo p) => p.Name == subTypeProperty.Name && p.IsVirtual() && p.GetBaseDefinition() != null && p.GetBaseDefinition().DeclaringType.IsAssignableFrom(subTypeProperty.DeclaringType));
                 if (num3 == -1)
                 {
                     initialProperties.Add(subTypeProperty);
                 }
             }
         }
     }
 }