Exemple #1
0
        /// <summary>
        /// Register a new <see cref="IConfigProvider"/>.
        /// Only accepts one object per type.
        /// </summary>
        /// <param name="obj">A instance of a IConfigProvider implementation class</param>
        public void RegisterConfigProvider(IConfigProvider obj)
        {
            Type providerType = obj.GetType();
            bool contains     = providers.Where(x => x.GetType() == providerType).Count() > 0;

            if (!contains)
            {
                providers.Add(obj);
            }
        }