/** * remove a specific SpringConfig from the registry * @param springConfig the of the SpringConfig to remove * @return true if the SpringConfig was removed, false if it was not present. */ public bool removeSpringConfig(SpringConfig springConfig) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } return(mSpringConfigMap.Remove(springConfig) != null); }
/** * set the config class * @param springConfig config class for the spring * @return this Spring instance for chaining */ public Spring setSpringConfig(SpringConfig springConfig) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } mSpringConfig = springConfig; return(this); }
/** * add a SpringConfig to the registry * * @param springConfig SpringConfig to add to the registry * @param configName name to give the SpringConfig in the registry * @return true if the SpringConfig was added, false if a config with that name is already * present. */ public bool addSpringConfig(SpringConfig springConfig, string configName) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } if (configName == null) { throw new IllegalArgumentException("configName is required"); } if (mSpringConfigMap.ContainsKey(springConfig)) { return(false); } mSpringConfigMap.Add(springConfig, configName); return(true); }