Ejemplo n.º 1
0
 public Configs()
 {
     CustomValues   = new ConfigValuesContainer(CustomValuesSectionName);
     LanguageValues = new LangValuesContainer();
     ProxyServers   = new List <ProxyValue>();
     Dialogs        = new DialogsContainer();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Build serializeble configs from work data
        /// </summary>
        public Configs(BotConfigs configs, DialogsProvider dialogs)
        {
            BasicDelay = configs.BasicDelay;
            BotHash    = configs.BotHash;
            BotName    = configs.BotName;

            CustomValues   = new ConfigValuesContainer(configs.GetCustomValues(), CustomValuesSectionName);
            LanguageValues = new LangValuesContainer(configs.TextStrings);

            // fill proxies
            ProxyServers = new List <ProxyValue>();
            foreach (var prox in configs.Proxies)
            {
                ProxyServers.Add(new ProxyValue(prox));
            }

            Dialogs = new DialogsContainer(dialogs);
        }