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);
                }
            }
        }
Esempio n. 2
0
        public void Add(ReportDefinitionScore item)
        {
            this.Items.Add(item);

            if (!this.Mapping.ContainsKey(item.Identity))
            {
                this.Mapping.Add(item.Identity, this.Items.Count - 1);
            }
        }
Esempio n. 3
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);
            }
        }
 public ReportDefinitionScoreProperties(ReportDefinitionScore score)
 {
     this.Properties = new Dictionary <string, object>();
     this.Score      = score;
 }