public CBackgroundThread(String seviceName, String adminEmail, SmtpCfg smtp, ErrorLogWriterDelegate errLogger, ThreadStart execute)
   : base(seviceName) {
   if (errLogger == null)
     throw new EBioException("Праметер p_errLogger не определен!");
   this.smtpCfg = smtp;
   this.adminEmail = adminEmail;
   this.ErrLogWriter = errLogger;
   this._queueProcessor = execute;
 }
Esempio n. 2
0
 public static SmtpCfg LoadFromXml(XmlElement smtpNode) {
   if (smtpNode != null) {
     var rslt = new SmtpCfg {
       smtpServer = Xml.getAttribute<String>(smtpNode, "smtpServer", String.Empty),
       port = Xml.getAttribute<Int32>(smtpNode, "port", 25),
       authUser = Xml.getAttribute<String>(smtpNode, "authUser", String.Empty),
       authPwd = Xml.getAttribute<String>(smtpNode, "authPwd", String.Empty),
       fromMailAddr = Xml.getAttribute<String>(smtpNode, "fromMailAddr", String.Empty),
       encoding = Xml.getAttribute<String>(smtpNode, "encoding", String.Empty)
     };
     return rslt;
   }
   return null;
 }