private static ConfigurationMap GetConfigurationMap(Type type) { ConfigurationMap cm; if (!targets.ContainsKey(type)) { cm = new ConfigurationMap(type); targets[type] = cm; } else { cm = (ConfigurationMap)targets[type]; } return(cm); }
/// <summary> /// Configure all targets in the specified type (static members). /// </summary> /// <param name="configStoreName">The name of the handler to use as configuration source. /// If null is given, GDA's configuration store will be used (effectively this means /// one of the automatically registered handlers).</param> /// <param name="type">The type to be configured</param> public static void Configure(string configStoreName, Type type) { InitializeHandlers(); lock (cfgLock) { ConfigurationMap cm = GetConfigurationMap(type); if (configStoreName != null) { IList list = new ArrayList(1); list.Add(namedHandlers[configStoreName]); cm.Configure(list, type); } else { cm.Configure(handlers, type); } } }