private LoadContainer CopyForConstraint(LoadContainer root, string constraint)
        {
            List <LoadContainer> list = new List <LoadContainer>();

            foreach (LoadEntity loadEntity in root.Children)
            {
                LoadContainer root2         = (LoadContainer)loadEntity;
                LoadContainer loadContainer = this.CopyForConstraint(root2, constraint);
                if (loadContainer != null)
                {
                    list.Add(loadContainer);
                }
            }
            bool flag = this.ShouldCullNode(root, list, constraint);

            if (flag)
            {
                return(null);
            }
            LoadContainer shallowCopy = root.GetShallowCopy();

            foreach (LoadContainer child in list)
            {
                shallowCopy.AddChild(child);
            }
            return(shallowCopy);
        }
 public BandMailboxRebalanceData(LoadContainer sourceDatabase, LoadContainer targetDatabase, LoadMetricStorage rebalanceInformation)
 {
     this.SourceDatabase       = sourceDatabase.GetShallowCopy();
     this.TargetDatabase       = targetDatabase.GetShallowCopy();
     this.RebalanceInformation = rebalanceInformation;
 }