public StandardizeValidateCommandHandler(Standardization standardization, Validation validation, IBlobStorage blobStorage, IIssuesConfig issuesConfig)
        {
            if (standardization == null)
            {
                throw new ArgumentNullException(nameof(standardization));
            }

            if (validation == null)
            {
                throw new ArgumentNullException(nameof(validation));
            }

            if (blobStorage == null)
            {
                throw new ArgumentNullException(nameof(blobStorage));
            }

            if (issuesConfig == null)
            {
                throw new ArgumentNullException(nameof(issuesConfig));
            }

            this.standardization = standardization;
            this.validation      = validation;
            this.blobStorage     = blobStorage;
            this.issuesConfig    = issuesConfig;
        }
Beispiel #2
0
        public static List <Issue> ResolveIssues(IEnumerable <Sds.Domain.Issue> issues, IIssuesConfig issuesConfig)
        {
            var logIssues = issuesConfig.EntryTypes.ToList();

            var res = new List <Issue>();

            foreach (var issue in issues)
            {
                var issueByCode = logIssues.Where(i => i.Code == issue.Code).Single();

                res.Add(new Issue
                {
                    Code     = issue.Code,
                    Title    = issueByCode.Title,
                    Message  = issue.Message,
                    AuxInfo  = issue.AuxInfo,
                    Severity = (Domain.Models.Severity)issueByCode.Severity
                });
            }
            return(res);
        }