Пример #1
0
        /// <summary>
        /// 构造方法
        /// </summary>
        public DbEngineConfigurationSection()
        {
            DatabaseSets      = new List <DatabaseSetElement>();
            DatabaseSets      = DatabaseProviderElementCollection.DatabaseSetElement();
            DatabaseProviders = new DatabaseProviderElementCollection();
            ConnectionLocator = new ConnectionLocatorElement();
            DefaultLogger defaultLogger = new DefaultLogger();

            System.Threading.Tasks.Task.Run(() =>
            {
                bool bo = true;
                while (bo)
                {
                    bo = false;
                    try
                    {
                        defaultLogger.RunLog();
                    }
                    catch (Exception)
                    {
                        bo = true;
                    }
                }
            });

            //logListeners = new ConfigurationProperty("logListeners", typeof(ListenerElementCollection), null, ConfigurationPropertyOptions.None);
            //metrics = new ConfigurationProperty("metrics", typeof(MetricsElement), null, ConfigurationPropertyOptions.None);
            //tracing = new ConfigurationProperty("tracing", typeof(TracingElement), null, ConfigurationPropertyOptions.None);
            //log = new ConfigurationProperty("log", typeof(LoggingElement), null, ConfigurationPropertyOptions.None);
            //connectionLocator = new ConfigurationProperty("connectionLocator", typeof(ConnectionLocatorElement), null, ConfigurationPropertyOptions.None);
            //rw = new ConfigurationProperty("rw", typeof(RWSplittingElement), null, ConfigurationPropertyOptions.None);
            //executor = new ConfigurationProperty("executor", typeof(ExecutorElement), null, ConfigurationPropertyOptions.None);
        }
Пример #2
0
        /// <summary>
        /// 构造方法
        /// </summary>
        public DbEngineConfigurationSection()
        {
            DatabaseSets = new List <DatabaseSetElement>();
            DatabaseSets = DatabaseProviderElementCollection.DatabaseSetElement();

            DatabaseProviders = new DatabaseProviderElementCollection();

            ConnectionLocator = new ConnectionLocatorElement();

            //databaseProviders = new ConfigurationProperty("databaseProviders", typeof(DatabaseProviderElementCollection), null, ConfigurationPropertyOptions.None);
            //logListeners = new ConfigurationProperty("logListeners", typeof(ListenerElementCollection), null, ConfigurationPropertyOptions.None);
            //metrics = new ConfigurationProperty("metrics", typeof(MetricsElement), null, ConfigurationPropertyOptions.None);
            //tracing = new ConfigurationProperty("tracing", typeof(TracingElement), null, ConfigurationPropertyOptions.None);
            //log = new ConfigurationProperty("log", typeof(LoggingElement), null, ConfigurationPropertyOptions.None);
            //connectionLocator = new ConfigurationProperty("connectionLocator", typeof(ConnectionLocatorElement), null, ConfigurationPropertyOptions.None);
            //rw = new ConfigurationProperty("rw", typeof(RWSplittingElement), null, ConfigurationPropertyOptions.None);
            //executor = new ConfigurationProperty("executor", typeof(ExecutorElement), null, ConfigurationPropertyOptions.None);
        }