コード例 #1
0
ファイル: BusinessLogic.cs プロジェクト: ChristophWurst/UFO
 public BusinessLogic(DALFactory dalFactory, IMailService ms, IPdfMaker pdf)
 {
     this.db = dalFactory.CreateDatabase();
     this.dalFactory = dalFactory;
     this.ms = ms;
     this.pdf = pdf;
 }
コード例 #2
0
ファイル: BusinessLogic.cs プロジェクト: ChristophWurst/UFO
 public BusinessLogic(DALFactory dalFactory)
 {
     this.db = dalFactory.CreateDatabase();
     this.dalFactory = dalFactory;
     var appSettings = ConfigurationManager.AppSettings;
     var smtpServer = appSettings["smtpServer"];
     var mailAddress = new MailAddress(appSettings["mailAddress"], appSettings["sender"]);
     var user = appSettings["user"];
     var pwd = appSettings["pwd"];
     var port = int.Parse(appSettings["port"]);
     ms = new MailService(smtpServer, port, user, pwd, mailAddress);
     pdfPath = appSettings["pdfPath"];
     pdfName = appSettings["pdfName"];
     pdf = new PdfMaker(pdfPath, pdfName);
 }
コード例 #3
0
ファイル: DALFactoryTest.cs プロジェクト: ChristophWurst/UFO
 public void SetUp()
 {
     factory = DALFactory.GetInstance();
     db = factory.CreateDatabase();
 }