public ReportDefinitionScoreGroup(ReportDefinitionVariable variable, XmlNode xmlNode)
            : base(variable, xmlNode)
        {
            this.Scores = new List <ReportDefinitionScore>();

            // Run through all child nodes of the xml node.
            foreach (XmlNode xmlNodeScore in this.XmlNode.ChildNodes)
            {
                ReportDefinitionScore score = null;

                switch (xmlNodeScore.Name)
                {
                case "Category":
                    score = new ReportDefinitionCategory(this.Variable, xmlNodeScore);
                    break;

                case "TaxonomyCategory":
                    score = new ReportDefinitionTaxonomyCategory(this.Variable, xmlNodeScore);
                    break;

                case "ScoreGroup":
                    score = new ReportDefinitionScoreGroup(this.Variable, xmlNodeScore);
                    break;
                }

                if (score != null)
                {
                    this.Scores.Add(score);
                }
            }
        }
Beispiel #2
0
        private void ParseCategoryValue(XmlNode xmlNodeScore)
        {
            ReportDefinitionScore score = null;

            switch (xmlNodeScore.Name)
            {
            case "Category":
                score = new ReportDefinitionCategory(this, xmlNodeScore);
                break;

            case "TaxonomyCategory":
                score = new ReportDefinitionTaxonomyCategory(this, xmlNodeScore);
                break;

            case "ScoreGroup":
                score = new ReportDefinitionScoreGroup(this, xmlNodeScore);
                break;
            }

            if (score != null)
            {
                this.Scores.Add(score);
            }
        }