public override ChoBaseConfigurationElement GetMe(Type type)
        {
            ChoGuard.ArgumentNotNull(type, "Type");

            if (_xmlConfigurationElement == null)
            {
                lock (_padLock)
                {
                    if (_xmlConfigurationElement == null)
                    {
                        _xmlConfigurationElement = new ChoXmlConfigurationElement(ConfigElementPath, BindingMode, TraceOutputDirectory, TraceOutputFileName.IsNullOrEmpty() ? ChoPath.AddExtension(type.FullName, ChoReservedFileExt.Log) : TraceOutputFileName);
                        _xmlConfigurationElement.DefaultConfigSectionHandlerType = ConfigSectionHandlerType;
                        _xmlConfigurationElement.LogCondition       = LogCondition;
                        _xmlConfigurationElement.LogTimeStampFormat = LogTimeStampFormat;
                    }
                }
            }

            return(_xmlConfigurationElement);
        }
Exemple #2
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);
        }