Пример #1
0
        private XmlIssue CreateXmlIssue([NotNull] Issue issue,
                                        [CanBeNull] IGeometry geometry)
        {
            var result = new XmlIssue
            {
                Description       = Escape(issue.Description),
                IssueCode         = issue.IssueCode?.ID,
                AffectedComponent = Escape(issue.AffectedComponent)
            };

            if (geometry != null && !geometry.IsEmpty)
            {
                result.Extent = CreateXmlEnvelope(geometry);
            }

            foreach (InvolvedTable involvedTable in issue.InvolvedTables)
            {
                if (involvedTable.RowReferences.Count == 0 &&
                    !_reportInvolvedTableForSchemaIssues)
                {
                    continue;
                }

                result.AddInvolvedTable(new XmlInvolvedTable(involvedTable.TableName,
                                                             involvedTable.KeyField,
                                                             involvedTable.RowReferences));
            }

            return(result);
        }
Пример #2
0
            public void AddIssue([NotNull] XmlIssue issue)
            {
                Assert.ArgumentNotNull(issue, nameof(issue));

                if (Issues == null)
                {
                    Issues = new List <XmlIssue>();
                }

                Issues.Add(issue);
            }