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); }
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); }