Пример #1
0
        /// <summary>
        /// Add a new source of the specified type to the <see cref="ConfigManager"/>.
        /// </summary>
        /// <typeparam name="T">The <see cref="Type"/> of the source that has to be added.</typeparam>
        /// <param name="settings">The new source settings.</param>
        public static void AddSource <T>(DataStore settings) where T : IConfigSource
        {
            IConfigSource newSource = (IConfigSource)Activator.CreateInstance(typeof(T), true);

            newSource.Initialize(settings);
            s_Sources.Add(newSource);
        }