예제 #1
0
 public APICommand(Setting setting)
 {
     _setting          = setting;
     lastupdateStorage = new LastSyncUpdateStorage();
     ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
     initialHttpClient();
 }
예제 #2
0
        public OWSOService(Setting setting)
        {
            InitializeComponent();
            _logger = Logger.Initialize(setting);

            _database         = new Database(setting);
            apiCommand        = new APICommand(setting);
            lastupdateStorage = new LastSyncUpdateStorage();

            timer = new Timer(setting.syncInterval * 60000)
            {
                AutoReset = true
            };
            timer.Elapsed += OnTimer;
        }