コード例 #1
0
 public EmailSettingsViewModel(ISettingsHandler settingsHandler)
 {
     _settingsHandler    = settingsHandler ?? throw new ArgumentException("Parameter cannot be null", nameof(settingsHandler));
     _emailFrom          = settingsHandler.GetEmailFrom();
     _emailFromAlias     = settingsHandler.GetEmailFromAlias();
     _emailTo            = settingsHandler.GetEmailTo();
     _emailFromPassword  = settingsHandler.GetEmailFromPassword();
     _emailSmtpEnableSsl = settingsHandler.GetEmailSmtpEnableSsl();
     _emailSmtpHost      = settingsHandler.GetEmailSmtpHost();
     _emailSmtpPort      = settingsHandler.GetEmailSmtpPort();
     _emailSmtpUserName  = settingsHandler.GetEmailSmtpUserName();
     _isExpanded         = settingsHandler.GetEmailIsExpanded();
 }