예제 #1
0
        public override ChoBaseConfigurationElement GetMe(Type type)
        {
            ChoGuard.ArgumentNotNull(type, "Type");

            if (_configurationElement == null)
            {
                lock (SyncRoot)
                {
                    if (_configurationElement == null)
                    {
                        _configurationElement = new ChoConfigurationElement(ConfigElementPath, BindingMode, TraceOutputDirectory, TraceOutputFileName.IsNullOrEmpty() ? ChoPath.AddExtension(type.FullName, ChoReservedFileExt.Log) : TraceOutputFileName);
                        _configurationElement.DefaultConfigSectionHandlerType = ConfigSectionHandlerType;
                        _configurationElement.Defaultable        = Defaultable;
                        _configurationElement.ConfigStorageType  = ConfigStorageType;
                        _configurationElement.LogCondition       = LogCondition;
                        _configurationElement.LogTimeStampFormat = LogTimeStampFormat;
                        _configurationElement.ConfigFilePath     = ConfigFilePath;
                        _configurationElement[CONNECTION_STRING] = _connectionString;
                        _configurationElement[TABLE_NAME]        = _tableName;
                        //_configurationElement[LAST_WRITE_TIME_COLUMN_NAME] = _lastWriteTimeColumnName;
                        //if (!CreateTableSQL.IsNullOrWhiteSpace())
                        //    _configurationElement[CREATE_TABLE_SQL] = CreateTableSQL;
                        LoadParameters(_configurationElement);
                    }
                }
            }

            return(_configurationElement);
        }
        internal ChoBaseConfigurationElement GetMe(Type type)
        {
            ChoGuard.ArgumentNotNull(type, "Type");

            if (_configurationElement == null)
            {
                lock (SyncRoot)
                {
                    if (_configurationElement == null)
                    {
                        _configurationElement = new ChoConfigurationElement(ConfigElementPath);
                        InitializeConfigElement(_configurationElement, type);
                        Initialize(_configurationElement);
                    }
                }
            }

            return(_configurationElement);
        }