// Token: 0x06000F80 RID: 3968 RVA: 0x0002DF3C File Offset: 0x0002C13C
        protected override void FillProperties(Type type, PSObject psObject, object dummyObject, IList <string> properties)
        {
            ConfigurableObject configurableObject = dummyObject as ConfigurableObject;

            if (configurableObject == null)
            {
                throw new ArgumentException("This method only support ConfigurableObject; please override this method if not this type!");
            }
            if (psObject.Members["ExchangeVersion"] != null)
            {
                PropertyBag           propertyBag           = configurableObject.propertyBag;
                ExchangeObjectVersion exchangeObjectVersion = MockObjectCreator.GetPropertyBasedOnDefinition(propertyBag.ObjectVersionPropertyDefinition, psObject.Members["ExchangeVersion"].Value) as ExchangeObjectVersion;
                if (exchangeObjectVersion != null)
                {
                    configurableObject.SetExchangeVersion(exchangeObjectVersion);
                }
            }
            foreach (PSMemberInfo psmemberInfo in psObject.Members)
            {
                if (properties.Contains(psmemberInfo.Name))
                {
                    this.FillProperty(type, psObject, configurableObject, psmemberInfo.Name);
                }
            }
            configurableObject.ResetChangeTracking();
        }
        internal bool TryApplyChange(ProviderPropertyDefinition pdef, ConfigurableObject targetObject, PropertyUpdateOperation op)
        {
            object obj = null;

            if (this.TryGetValue(pdef, out obj))
            {
                Exception ex = null;
                try
                {
                    if (op == PropertyUpdateOperation.Replace)
                    {
                        object obj2 = targetObject[pdef];
                        if ((!object.Equals(obj, pdef.DefaultValue) || obj2 != null) && !object.Equals(obj2, obj))
                        {
                            if (pdef == ADObjectSchema.ExchangeVersion)
                            {
                                targetObject.SetExchangeVersion((ExchangeObjectVersion)obj);
                            }
                            else
                            {
                                targetObject[pdef] = obj;
                            }
                        }
                    }
                    else
                    {
                        MultiValuedPropertyBase multiValuedPropertyBase  = obj as MultiValuedPropertyBase;
                        MultiValuedPropertyBase multiValuedPropertyBase2 = targetObject[pdef] as MultiValuedPropertyBase;
                        if (multiValuedPropertyBase != null && multiValuedPropertyBase2 != null)
                        {
                            foreach (object item in ((IEnumerable)multiValuedPropertyBase))
                            {
                                switch (op)
                                {
                                case PropertyUpdateOperation.AddValues:
                                    multiValuedPropertyBase2.Add(item);
                                    break;

                                case PropertyUpdateOperation.RemoveValues:
                                    multiValuedPropertyBase2.Remove(item);
                                    break;
                                }
                            }
                        }
                    }
                    return(true);
                }
                catch (DataValidationException ex2)
                {
                    ex = ex2;
                }
                catch (ArgumentException ex3)
                {
                    ex = ex3;
                }
                catch (FormatException ex4)
                {
                    ex = ex4;
                }
                catch (LocalizedException ex5)
                {
                    ex = ex5;
                }
                if (ex != null)
                {
                    MrsTracer.Common.Warning("Property {0} could not be set to '{1}', error {2}", new object[]
                    {
                        pdef.Name,
                        obj,
                        CommonUtils.FullExceptionMessage(ex)
                    });
                    return(false);
                }
                return(false);
            }
            return(false);
        }