Exemplo n.º 1
0
        //
        // 集合实现
        //

        /// <summary>
        /// add方法
        /// </summary>
        /// <param name="imp"> 提供者实例</param>
        public void Add(DBProvider provider)
        {
            string name                 = provider.ProviderName;
            string typename             = provider.GetType().AssemblyQualifiedName;
            DBProviderConfigElement ele = new DBProviderConfigElement(
                name, typename, provider);

            this.Add(ele);
        }
Exemplo n.º 2
0
        //
        // 方法
        //

        /// <summary>
        /// 增加方法
        /// </summary>
        /// <param name="providerName"></param>
        /// <param name="implemementation"></param>
        internal void Add(string providerName, DBProvider provider)
        {
            DBProviderConfigElement ele = new DBProviderConfigElement(
                providerName,
                provider.GetType().AssemblyQualifiedName,
                provider);

            this.Providers.Add(ele);
        }