예제 #1
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("ewv.server...");

                _config = new KonfigurationAdapter();
                var ping = new PingAdapter(_config);
                using (_sendmail = new SmtpAdapter(_config))
                using (var receivemail = new ImapAdapter(_config))
                using (var wiedervorlagespeicher = new WiedervorlagespeicherAdapter(_config))
                {
                    var domain = new Wiedervorlage(_config);
                    var integration = new Integration(ping, receivemail, _sendmail, wiedervorlagespeicher, domain);
                    integration.Fehler_bei_Einplanung += Absender_über_Fehler_informieren;

                    integration.Ausführen();
                }
            }
            catch (Exception ex)
            {
                LogAdapter.Log(ex);
                Console.WriteLine("  Fehler: {0}", ex.Message);
            }
        }
예제 #2
0
 public Integration(PingAdapter ping, ImapAdapter receivemail, SmtpAdapter sendmail, WiedervorlagespeicherAdapter wiedervorlagespeicher, Wiedervorlage domain)
 {
     _ping = ping;
     _receivemail = receivemail;
     _sendmail = sendmail;
     _wiedervorlagespeicher = wiedervorlagespeicher;
     _domain = domain;
 }