using System;
using System.Collections.Generic;
using System.Text;
using Wicture.DbRESTFul.Configuration;

namespace JiaZhiQuan.Common.Config
{
    public class ConfigFromDbConfig
    {
        public const string ConfigSectionName = "ConfigFromDbConfig";

        public bool Disabled { get; set; } = false;

        public static ConfigFromDbConfig GetFromConfig()
        {
            if (!ConfigurationManager.Settings.Document.ContainsKey(ConfigSectionName))
            {
                return new ConfigFromDbConfig();
            }
            return ConfigurationManager.Settings.GetConfig<ConfigFromDbConfig>(ConfigSectionName);
        }
    }
}
