public virtual void CopyFrom(ItemConfiguration configuration) { ItemConfiguration other = (ItemConfiguration)configuration; if (other.properties != null) { properties = new Hashtable(); foreach (DictionaryEntry e in other.properties) { if (e.Value is ICloneable) { properties [e.Key] = ((ICloneable)e.Value).Clone(); } else { properties [e.Key] = e.Value; } } } else { properties = null; } customCommands = other.customCommands.Clone(); }
public CustomCommandCollection Clone() { CustomCommandCollection col = new CustomCommandCollection(); col.CopyFrom(this); return(col); }
public void CopyFrom(CustomCommandCollection col) { Clear(); foreach (CustomCommand cmd in col) { Add(cmd.Clone()); } }
protected virtual void OnCopyFrom(ItemConfiguration configuration, bool isRename) { if (configuration.properties != null) { properties = new Hashtable(); foreach (DictionaryEntry e in configuration.properties) { if (e.Value is ICloneable) { properties [e.Key] = ((ICloneable)e.Value).Clone(); } else { properties [e.Key] = e.Value; } } } else { properties = null; } customCommands = configuration.customCommands.Clone(); }