日期:2014-05-19  浏览次数:20389 次

大哥们帮忙看看这段没错的代码
using   System;
using   System.Reflection;
using   System.Collections.Specialized;
using   System.Configuration.Provider;
using   System.Data;
using   System.Web.Caching;
using   System.Web;
using   System.Web.Configuration;
using   System.Configuration;
namespace   Commerce.Providers   {

        public   abstract   class   CatalogProvider   :   System.Configuration.Provider.ProviderBase
        {

                static   CatalogProvider   _instance;

                static   object   padLock;
                public   static   CatalogProvider   Instance   {

                        get   {
                                CatalogProvider   tempInstance;
                                if   (_instance   ==   null)
                                        padLock   =   new   object();
                                lock   (padLock)   {
                                        tempInstance   =   LoadProvider();
                                        _instance   =   tempInstance;
                                }

                                return   _instance;
                        }
                }
                static   CatalogProvider   LoadProvider()   {

                        //   Get   the   names   of   the   providers
                        //   Use   the   cache   because   the   reflection   used   later   is   expensive
                        Cache   cache   =   System.Web.HttpRuntime.Cache;
                        string   cacheKey   =   null;

                        CatalogProvider   _instanceLoader;
                        CatalogProviderConfiguration   config   =   CatalogProviderConfiguration.GetConfig();