public RetranslatorPilotka()
        {
            settings = new PilotkaSettings();

            if (settings.Enabled)
            {
                log                  = LogManager.GetLogger(settings.LoggerName);
                imeiDictionary       = ImeiDictionaryLoader.loadDictionary(settings);
                webRequestSenderPool = new ObjectPool <WebRequestSender>(20, () => new WebRequestSender(settings));
            }
        }
Esempio n. 2
0
        public static Dictionary <string, StateSended> loadDictionary(PilotkaSettings settings)
        {
            ILog log = LogManager.GetLogger(settings.LoggerName);
            Dictionary <string, StateSended> imeiDictionary = new Dictionary <string, StateSended>();

            var imeiSet = ImeiListLoader.loadImeis(log, settings.ImeiListFileName);

            foreach (string imei in imeiSet)
            {
                imeiDictionary.Add(imei, new StateSended());
            }
            return(imeiDictionary);
        }
 public WebRequestSender(PilotkaSettings settings)
 {
     this.settings = settings;
     this.log      = LogManager.GetLogger(settings.LoggerName);
     this.url      = settings.Url;
 }