Esempio n. 1
0
        public Config()
        {
            foreach (var s in configs)
            {
                try
                {
                    var str = File.ReadAllText($@"{HOME_CONFIG}{s}.cfg");

                    if (str == null || str.Length == 0)
                    {
                        throw new ReadConfigException($"Can`t read configuration on { HOME_CONFIG }{ s}");
                    }

                    myCookies[s] = Cookies.FromJson(str);

                    if (myCookies[s] == null)
                    {
                        throw new ReadCookieException($"Can`t read cookies from { HOME_CONFIG }{ s}");
                    }
                }
                catch
                {
                }
            }
        }