Esempio n. 1
0
 public void CopyFrom(ExchangeDataObject source)
 {
     if (source == null)
     {
         throw new ArgumentNullException("source");
     }
     this.propertyBag = (PropertyBag)source.PropertyBag.Clone();
     this.ResetChangeTracking();
 }
Esempio n. 2
0
        public void CopyChangesFrom(IConfigurable source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            ExchangeDataObject exchangeDataObject = source as ExchangeDataObject;

            if (exchangeDataObject == null)
            {
                throw new ArgumentOutOfRangeException("source", "Dev Error: Copying changes from invalid object type");
            }
            foreach (object obj in exchangeDataObject.propertyBag.Keys)
            {
                ProviderPropertyDefinition key = (ProviderPropertyDefinition)obj;
                if (exchangeDataObject.propertyBag.IsChanged(key))
                {
                    this[key] = exchangeDataObject[key];
                }
            }
        }