GetQualityConditions(
            [NotNull] XmlDataQualityCategory category)
        {
            if (category.QualityConditions != null)
            {
                foreach (XmlQualityCondition qc in category.QualityConditions)
                {
                    yield return(new KeyValuePair <XmlQualityCondition, XmlDataQualityCategory>(
                                     qc, category));
                }
            }

            if (category.SubCategories != null)
            {
                foreach (XmlDataQualityCategory subCategory in category.SubCategories)
                {
                    foreach (
                        KeyValuePair <XmlQualityCondition, XmlDataQualityCategory> pair in
                        GetQualityConditions(subCategory))
                    {
                        yield return(pair);
                    }
                }
            }
        }
        public void AddSubCategory([NotNull] XmlDataQualityCategory xmlSubCategory)
        {
            if (SubCategories == null)
            {
                SubCategories = new List <XmlDataQualityCategory>();
            }

            SubCategories.Add(xmlSubCategory);
        }
        public void AddCategory([NotNull] XmlDataQualityCategory xmlCategory)
        {
            Assert.ArgumentNotNull(xmlCategory, nameof(xmlCategory));

            if (Categories == null)
            {
                Categories = new List <XmlDataQualityCategory>();
            }

            Categories.Add(xmlCategory);
        }