// Copyright (c) 2014-present schick Informatik // Resembles "Importer.java" from ported transmitter code using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using log4net; namespace bsmd.hisnord { public class Importer { private string[] curFiles = null; private readonly ILog _log = LogManager.GetLogger(typeof(Importer)); #region public methods public void Execute() { _log.Info("starting transmitter"); try { this.curFiles = TransmitterUtils.readFiles(Properties.Settings.Default.IMPDIR); this.SendFiles(); this.GetAnswers(); } catch(Exception ex) { _log.ErrorFormat("transmitter failure: {0}", ex.ToString()); } } #endregion #region private methods private void GetAnswers() { throw new NotImplementedException(); } private void SendFiles() { foreach(string file in curFiles) { if(File.Exists(file)) // this is probably nonsense { new Thread(() => SendFile(file)) { IsBackground = true }.Start(); } } } private void SendFile(string file) { throw new NotImplementedException(); } #endregion } }