// Token: 0x060039E0 RID: 14816 RVA: 0x000DFCD0 File Offset: 0x000DDED0 internal void ApplyCloneableProperties(ADPresentationObject source) { IEnumerable <PropertyInfo> enabledPropertiesFromPropertyInfoList = ADPresentationObject.GetEnabledPropertiesFromPropertyInfoList(source); IEnumerable <PropertyInfo>[] array = new IEnumerable <PropertyInfo>[] { this.CloneableOnceProperties, this.CloneableProperties, enabledPropertiesFromPropertyInfoList }; foreach (IEnumerable <PropertyInfo> enumerable in array) { foreach (PropertyInfo propertyInfo in enumerable) { object value = propertyInfo.GetValue(source, null); object value2 = propertyInfo.GetValue(this, null); if (value != null && value2 != value) { MultiValuedPropertyBase multiValuedPropertyBase = value as MultiValuedPropertyBase; if (multiValuedPropertyBase == null || multiValuedPropertyBase.Count != 0) { if (propertyInfo.PropertyType == typeof(MultiValuedProperty <Capability>)) { MultiValuedProperty <Capability> multiValuedProperty = (MultiValuedProperty <Capability>)value; CapabilityHelper.SetSKUCapability((multiValuedProperty.Count == 0) ? null : new Capability?(multiValuedProperty[0]), (MultiValuedProperty <Capability>)value2); } else { propertyInfo.SetValue(this, value, null); } } } } } }
// Token: 0x060039E1 RID: 14817 RVA: 0x000DFDF8 File Offset: 0x000DDFF8 internal static void ApplyPresentationObjectDelta(ADPresentationObject oldPlan, ADPresentationObject newPlan, ADPresentationObject target, ApplyMailboxPlanFlags flags) { IEnumerable <PropertyInfo> enabledPropertiesFromPropertyInfoList = ADPresentationObject.GetEnabledPropertiesFromPropertyInfoList(newPlan, oldPlan); IEnumerable <PropertyInfo>[] array; if (oldPlan == null) { array = new IEnumerable <PropertyInfo>[] { target.CloneableOnceProperties, target.CloneableProperties, enabledPropertiesFromPropertyInfoList }; } else { array = new IEnumerable <PropertyInfo>[] { target.CloneableProperties, enabledPropertiesFromPropertyInfoList }; } bool flag = oldPlan == null && newPlan != null && flags.HasFlag(ApplyMailboxPlanFlags.PreservePreviousExplicitlySetValues); foreach (IEnumerable <PropertyInfo> enumerable in array) { foreach (PropertyInfo propertyInfo in enumerable) { object obj = null; object value = propertyInfo.GetValue(newPlan, null); MultiValuedPropertyBase multiValuedPropertyBase = value as MultiValuedPropertyBase; if (oldPlan != null) { obj = propertyInfo.GetValue(oldPlan, null); } if (propertyInfo.PropertyType == typeof(MultiValuedProperty <Capability>)) { if (!object.Equals(obj, value)) { MultiValuedProperty <Capability> sourceCapabilities = MultiValuedProperty <Capability> .Empty; if (value != null) { sourceCapabilities = (MultiValuedProperty <Capability>)value; } CapabilityHelper.SetSKUCapabilities(newPlan.Name, sourceCapabilities, (MultiValuedProperty <Capability>)propertyInfo.GetValue(target, null)); } } else if (obj != null || value != null) { if (obj == null || value == null) { if (flag) { object value2 = propertyInfo.GetValue(target, null); ADPropertyDefinition adpropertyDefinition = newPlan.Schema[propertyInfo.Name] as ADPropertyDefinition; if (adpropertyDefinition != null && ((adpropertyDefinition.DefaultValue == null && value2 != null) || (adpropertyDefinition.DefaultValue != null && !adpropertyDefinition.DefaultValue.Equals(value2)))) { continue; } } propertyInfo.SetValue(target, value, null); } else if (!obj.Equals(value)) { if (multiValuedPropertyBase == null) { propertyInfo.SetValue(target, value, null); } else { bool flag2 = false; MultiValuedPropertyBase multiValuedPropertyBase2 = obj as MultiValuedPropertyBase; if (multiValuedPropertyBase2.Count != multiValuedPropertyBase.Count) { flag2 = true; } else { foreach (object obj2 in ((IEnumerable)multiValuedPropertyBase2)) { bool flag3 = false; foreach (object obj3 in ((IEnumerable)multiValuedPropertyBase)) { if (obj2.Equals(obj3)) { flag3 = true; break; } } if (!flag3) { flag2 = true; break; } } } if (flag2) { propertyInfo.SetValue(target, value, null); } } } } } } }
// Token: 0x060039DE RID: 14814 RVA: 0x000DFC47 File Offset: 0x000DDE47 private static IEnumerable <PropertyInfo> GetEnabledPropertiesFromPropertyInfoList(ADPresentationObject source) { return(ADPresentationObject.GetEnabledPropertiesFromPropertyInfoList(source, null)); }