private static void GetChildPrivateProperties(IList <PropertyInfo> initialProperties, Type targetType, BindingFlags bindingAttr) { Label0: Type type = targetType.BaseType(); targetType = type; if (type == null) { return; } PropertyInfo[] properties = targetType.GetProperties(bindingAttr); for (int i = 0; i < (int)properties.Length; i++) { PropertyInfo propertyInfo = properties[i]; if (!ReflectionUtils.IsPublic(propertyInfo)) { int num = initialProperties.IndexOf <PropertyInfo>((PropertyInfo p) => p.Name == propertyInfo.Name); if (num == -1) { initialProperties.Add(propertyInfo); } else if (!ReflectionUtils.IsPublic(initialProperties[num])) { initialProperties[num] = propertyInfo; } } else if (!propertyInfo.IsVirtual()) { if (initialProperties.IndexOf <PropertyInfo>((PropertyInfo p) => { if (p.Name != propertyInfo.Name) { return(false); } return(p.DeclaringType == propertyInfo.DeclaringType); }) == -1) { initialProperties.Add(propertyInfo); } } else if (initialProperties.IndexOf <PropertyInfo>((PropertyInfo p) => { if (!(p.Name == propertyInfo.Name) || !p.IsVirtual() || p.GetBaseDefinition() == null) { return(false); } return(p.GetBaseDefinition().DeclaringType.IsAssignableFrom(propertyInfo.GetBaseDefinition().DeclaringType)); }) == -1) { initialProperties.Add(propertyInfo); } } goto Label0; }
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 (!ReflectionUtils.IsPublic(subTypeProperty)) { int num = initialProperties.IndexOf((PropertyInfo p) => p.Name == subTypeProperty.Name); if (num == -1) { initialProperties.Add(subTypeProperty); } else { 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); } } } } }
// Token: 0x06000E44 RID: 3652 RVA: 0x00052828 File Offset: 0x00050A28 private static void GetChildPrivateProperties(IList <PropertyInfo> initialProperties, Type targetType, BindingFlags bindingAttr) { while ((targetType = targetType.BaseType()) != null) { foreach (PropertyInfo subTypeProperty in targetType.GetProperties(bindingAttr)) { ReflectionUtils.< > c__DisplayClass44_0 CS$ < > 8__locals1 = new ReflectionUtils.< > c__DisplayClass44_0(); CS$ < > 8__locals1.subTypeProperty = subTypeProperty; if (!CS$ < > 8__locals1.subTypeProperty.IsVirtual()) { if (!ReflectionUtils.IsPublic(CS$ < > 8__locals1.subTypeProperty)) { int num = initialProperties.IndexOf((PropertyInfo p) => p.Name == CS$ < > 8__locals1.subTypeProperty.Name); if (num == -1) { initialProperties.Add(CS$ < > 8__locals1.subTypeProperty); } else if (!ReflectionUtils.IsPublic(initialProperties[num])) { initialProperties[num] = CS$ < > 8__locals1.subTypeProperty; } }
private static void GetChildPrivateProperties( IList <PropertyInfo> initialProperties, Type targetType, BindingFlags bindingAttr) { while ((targetType = targetType.BaseType()) != null) { foreach (PropertyInfo property in targetType.GetProperties(bindingAttr)) { PropertyInfo subTypeProperty = property; if (!ReflectionUtils.IsPublic(subTypeProperty)) { int index = initialProperties.IndexOf <PropertyInfo>((Func <PropertyInfo, bool>)(p => p.Name == subTypeProperty.Name)); if (index == -1) { initialProperties.Add(subTypeProperty); } else if (!ReflectionUtils.IsPublic(initialProperties[index])) { initialProperties[index] = subTypeProperty; } } else if (!subTypeProperty.IsVirtual()) { if (initialProperties.IndexOf <PropertyInfo>((Func <PropertyInfo, bool>)(p => p.Name == subTypeProperty.Name && p.DeclaringType == subTypeProperty.DeclaringType)) == -1) { initialProperties.Add(subTypeProperty); } } else if (initialProperties.IndexOf <PropertyInfo>((Func <PropertyInfo, bool>)(p => p.Name == subTypeProperty.Name && p.IsVirtual() && p.GetBaseDefinition() != null && p.GetBaseDefinition().DeclaringType.IsAssignableFrom(subTypeProperty.GetBaseDefinition().DeclaringType))) == -1) { initialProperties.Add(subTypeProperty); } } } }
// Token: 0x06001035 RID: 4149 RVA: 0x0005DA6C File Offset: 0x0005BC6C private static void GetChildPrivateProperties(IList <PropertyInfo> initialProperties, Type targetType, BindingFlags bindingAttr) { while ((targetType = targetType.BaseType()) != null) { foreach (PropertyInfo subTypeProperty in targetType.GetProperties(bindingAttr)) { ReflectionUtils.< > c__DisplayClass44_0 CS$ < > 8__locals1 = new ReflectionUtils.< > c__DisplayClass44_0(); CS$ < > 8__locals1.subTypeProperty = subTypeProperty; if (CS$ < > 8__locals1.subTypeProperty.IsVirtual()) { ReflectionUtils.< > c__DisplayClass44_1 CS$ < > 8__locals2 = new ReflectionUtils.< > c__DisplayClass44_1(); CS$ < > 8__locals2.CS$ < > 8__locals1 = CS$ < > 8__locals1; ReflectionUtils.< > c__DisplayClass44_1 CS$ < > 8__locals3 = CS$ < > 8__locals2; MethodInfo baseDefinition = CS$ < > 8__locals2.CS$ < > 8__locals1.subTypeProperty.GetBaseDefinition(); if (baseDefinition == null) { goto IL_E7; } Type declaringType; if ((declaringType = baseDefinition.DeclaringType) == null) { goto IL_E7; } IL_F9: CS$ < > 8__locals3.subTypePropertyDeclaringType = declaringType; if (initialProperties.IndexOf(delegate(PropertyInfo p) { if (p.Name == CS$ < > 8__locals2.CS$ < > 8__locals1.subTypeProperty.Name && p.IsVirtual()) { MethodInfo baseDefinition2 = p.GetBaseDefinition(); Type declaringType2; if (baseDefinition2 != null) { if ((declaringType2 = baseDefinition2.DeclaringType) != null) { goto IL_41; } } declaringType2 = p.DeclaringType; IL_41: return(declaringType2.IsAssignableFrom(CS$ < > 8__locals2.subTypePropertyDeclaringType)); } return(false); }) == -1) { initialProperties.Add(CS$ < > 8__locals2.CS$ < > 8__locals1.subTypeProperty); goto IL_126; } goto IL_126; IL_E7: declaringType = CS$ < > 8__locals2.CS$ < > 8__locals1.subTypeProperty.DeclaringType; goto IL_F9; } if (!ReflectionUtils.IsPublic(CS$ < > 8__locals1.subTypeProperty)) { int num = initialProperties.IndexOf((PropertyInfo p) => p.Name == CS$ < > 8__locals1.subTypeProperty.Name); if (num == -1) { initialProperties.Add(CS$ < > 8__locals1.subTypeProperty); } else if (!ReflectionUtils.IsPublic(initialProperties[num])) { initialProperties[num] = CS$ < > 8__locals1.subTypeProperty; } }
private static void GetChildPrivateProperties(IList <PropertyInfo> initialProperties, Type targetType, BindingFlags bindingAttr) { object obj; Label0: Type type = targetType.BaseType(); targetType = type; if (type == null) { return; } PropertyInfo[] properties = targetType.GetProperties(bindingAttr); for (int i = 0; i < (int)properties.Length; i++) { PropertyInfo propertyInfo = properties[i]; if (propertyInfo.IsVirtual()) { MethodInfo methodInfo = propertyInfo.GetBaseDefinition(); if (methodInfo != null) { obj = methodInfo.DeclaringType; if (obj != null) { goto Label1; } } else { obj = null; } obj = propertyInfo.DeclaringType; Label1: Type type1 = (Type)obj; if (initialProperties.IndexOf <PropertyInfo>((PropertyInfo p) => { object declaringType; if (!(p.Name == propertyInfo.Name) || !p.IsVirtual()) { return(false); } MethodInfo baseDefinition = p.GetBaseDefinition(); if (baseDefinition != null) { declaringType = baseDefinition.DeclaringType; if (declaringType != null) { return(((Type)declaringType).IsAssignableFrom(type1)); } } else { declaringType = null; } declaringType = p.DeclaringType; return(((Type)declaringType).IsAssignableFrom(type1)); }) == -1) { initialProperties.Add(propertyInfo); } } else if (!ReflectionUtils.IsPublic(propertyInfo)) { int num = initialProperties.IndexOf <PropertyInfo>((PropertyInfo p) => p.Name == propertyInfo.Name); if (num == -1) { initialProperties.Add(propertyInfo); } else if (!ReflectionUtils.IsPublic(initialProperties[num])) { initialProperties[num] = propertyInfo; } } else if (initialProperties.IndexOf <PropertyInfo>((PropertyInfo p) => { if (p.Name != propertyInfo.Name) { return(false); } return(p.DeclaringType == propertyInfo.DeclaringType); }) == -1) { initialProperties.Add(propertyInfo); } } goto Label0; }