Ejemplo n.º 1
0
        internal ConfigurationReportsData Convert(ReportingSettings source)
        {
            ConfigurationReportsData result = new ConfigurationReportsData();

            if (source != null)
            {
                result.EmailAddresses = String.Join(", ", source.Recipients);
            }
            return(result);
        }
Ejemplo n.º 2
0
        internal ReportingSettings CreateReportingSettings(ConfigurationReportsData source)
        {
            ReportingSettings result = new ReportingSettings();

            if (!String.IsNullOrWhiteSpace(source.EmailAddresses))
            {
                var emails = source.EmailAddresses.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim());
                if (emails.Count() > 0)
                {
                    result.Recipients.AddRange(emails);
                }
            }
            return(result);
        }