Beispiel #1
0
 /// <summary>
 /// Implementation of the <see cref="IDisposable"/> pattern
 /// </summary>
 /// <param name="disposing">True if this object is being disposed, false if it is being finalized</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (ExtensionData != null)
         {
             ExtensionData.Dispose();
             ExtensionData = null;
         }
     }
 }
 /// <summary>
 /// Cloning constructor.
 /// </summary>
 private ExtensionData(ExtensionData source, ICloningContext context)
 {
     _data = new Dictionary <Type, object>();
     foreach (var sourceData in source._data)
     {
         var valueClone = CloneBuilder.Clone(sourceData.Value);
         if (valueClone != null)
         {
             _data[sourceData.Key] = valueClone;
         }
     }
 }