string MailSenderAddress) GetMailConfig() { var mailServerUsername = configDataService.GetConfigValue(ConfigDataService.MailUsername) ?? throw new ConfigValueMissingException ( configDataService.GetConfigValueMissingExceptionMessage("MailServerUsername") ); var mailServerPassword = configDataService.GetConfigValue(ConfigDataService.MailPassword) ?? throw new ConfigValueMissingException ( configDataService.GetConfigValueMissingExceptionMessage("MailServerPassword") ); var mailServerAddress = configDataService.GetConfigValue(ConfigDataService.MailServer) ?? throw new ConfigValueMissingException ( configDataService.GetConfigValueMissingExceptionMessage("MailServerAddress") ); var mailServerPortString = configDataService.GetConfigValue(ConfigDataService.MailPort) ?? throw new ConfigValueMissingException ( configDataService.GetConfigValueMissingExceptionMessage("MailServerPortString") ); var mailSenderAddress = configDataService.GetConfigValue(ConfigDataService.MailFromAddress) ?? throw new ConfigValueMissingException ( configDataService.GetConfigValueMissingExceptionMessage("MailFromAddress") ); var mailServerPort = int.Parse(mailServerPortString); return(mailServerUsername, mailServerPassword, mailServerAddress, mailServerPort, mailSenderAddress); }
public UriBuilder GetDLSUriBuilder() { var trackingSystemBaseUrl = configDataService.GetConfigValue(ConfigDataService.AppBaseUrl) ?? throw new ConfigValueMissingException(configDataService.GetConfigValueMissingExceptionMessage("AppBaseUrl")); ; return(new UriBuilder(trackingSystemBaseUrl)); }