/** * Add a config element as a specific class. Usually this is done to add a * subclass as one of it's parent classes. */ public void addConfigElement(ConfigElement config, Object asClass) { if (config != null) { ConfigElement current = null; if (configSet.TryGetValue(asClass, out current)) { current.addConfigElement(config); } else { configSet.Add(asClass, cloneIfNecessary(config)); } } }