Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 /**
  * 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);
 }