コード例 #1
0
        public ElementManager() :
            base(null)
        {
            ElementManager = this;

            if (ConvertHelper.ToBoolean(ConfigurationManager.AppSettings[@"dataCache.enable"], true))
            {
                CacheManager = new DataCacheManager();
                CacheManager.Initialize(new DataCacheManagerConfiguration());
            }
            else
            {
                CacheManager = null;
            }

            DataQuerier = new AdoNetSqlQuerier();
            DataQuerier.Initialize(CacheManager);

            DataQuerier.ConnectionString = new SmartConnectionString(
                ConfigurationManager.ConnectionStrings[@"web"].ConnectionString);

            // --

            // Do this AFTER initializing the configuration.
            DataUpdaterInfo = new AdoNetUpdaterInformation(false);

            // --

            if (CacheManager != null)
            {
                CacheManager.StartScavenge();
            }
        }
コード例 #2
0
		public ElementManager() :
			base(null)
		{
			ElementManager = this;

			if (ConvertHelper.ToBoolean(ConfigurationManager.AppSettings[@"dataCache.enable"], true))
			{
				CacheManager = new DataCacheManager();
				CacheManager.Initialize(new DataCacheManagerConfiguration());
			}
			else
			{
				CacheManager = null;
			}

			DataQuerier = new AdoNetSqlQuerier();
			DataQuerier.Initialize(CacheManager);

			DataQuerier.ConnectionString = new SmartConnectionString(
				ConfigurationManager.ConnectionStrings[@"web"].ConnectionString);

			// --

			// Do this AFTER initializing the configuration.
			DataUpdaterInfo = new AdoNetUpdaterInformation(false);

			// --

			if (CacheManager != null)
			{
				CacheManager.StartScavenge();
			}
		}