Beispiel #1
0
 /// <summary>
 /// Internal constructor for the default implementations
 /// </summary>
 /// <param name="providername"></param>
 /// <param name="typename"></param>
 /// <param name="implementation"></param>
 internal DBProviderImplementationConfigElement(string providername, string typename, DBProviderImplementation implementation)
     : this()
 {
     this.ProviderName           = providername;
     this.ImplementationTypeName = typename;
     this._implementation        = implementation;
 }
        //
        // methods
        //

        /// <summary>
        /// Adds a custom provider to the configured set of providers
        /// </summary>
        /// <param name="providerName"></param>
        /// <param name="implemementation"></param>
        internal void Add(string providerName, DBProviderImplementation implemementation)
        {
            DBProviderImplementationConfigElement ele = new DBProviderImplementationConfigElement(
                providerName,
                implemementation.GetType().AssemblyQualifiedName,
                implemementation);

            this.Implementations.Add(ele);
        }
Beispiel #3
0
        //
        // collection modification methods
        //

        /// <summary>
        /// Adds a new implementation by taking the values from the instance itself and adding to the collection.
        /// It is an error if there is already an implementation with the same name (case in-sensitive)
        /// </summary>
        /// <param name="imp">The implementation to add</param>
        public void Add(DBProviderImplementation imp)
        {
            string name     = imp.ProviderName;
            string typename = imp.GetType().AssemblyQualifiedName;
            DBProviderImplementationConfigElement ele = new DBProviderImplementationConfigElement(
                name, typename, imp);

            this.Add(ele);
        }