コード例 #1
0
ファイル: HierarchicalData.cs プロジェクト: RalfKoban/Insight
        private HierarchicalData Clone(HierarchicalData cloneThis)
        {
            var newData = new HierarchicalData(cloneThis.Name, cloneThis.AreaMetric, cloneThis.WeightMetric, _weightIsAleadyNormalized);

            newData.Description = cloneThis.Description;
            newData.ColorKey    = cloneThis.ColorKey;
            newData.Tag         = cloneThis.Tag;

            foreach (var child in cloneThis.Children)
            {
                newData.AddChild(Clone(child));
            }

            return(newData);
        }
コード例 #2
0
        private HierarchicalData Clone(HierarchicalData cloneThis)
        {
            var newData = new HierarchicalData(cloneThis.Name, cloneThis.AreaMetric, cloneThis.WeightMetric);

            newData.Description            = cloneThis.Description;
            newData.ColorKey               = cloneThis.ColorKey;
            newData.Tag                    = cloneThis.Tag;
            newData.AreaMetricSum          = cloneThis.AreaMetricSum;
            newData.NormalizedWeightMetric = cloneThis.NormalizedWeightMetric;

            // TODO remove
            newData.Id = cloneThis.Id;

            foreach (var child in cloneThis._children)
            {
                newData.AddChild(Clone(child));
            }

            return(newData);
        }