public void AddToExistingCopyInfo(TreeNode copyInfo, string key, string value) { TreeNode deviceList = copyInfo.FindKeyChild(Tree.Failover_GoldCopy.DeviceList.NAME); TreeNode devicePair = new DevicePair(); deviceList.AddChild(devicePair); TreeNode source = new Source(key); TreeNode target = new Target(value); devicePair.AddChild(source); devicePair.AddChild(target); }
public bool CopyInfoContainsDeviceSource(TreeNode copyInfo, string key) { TreeNode deviceList = copyInfo.FindKeyChild(Tree.Failover_GoldCopy.DeviceList.NAME); foreach(TreeNode devicePair in deviceList.Children) { string source = devicePair.FindKeyChildValue(Source.NAME); if (source == key) return true; } return false; }
public bool CopyInfoContainsDeviceTarget(TreeNode copyInfo, string value) { TreeNode deviceList = copyInfo.FindKeyChild(Tree.Failover_GoldCopy.DeviceList.NAME); foreach (TreeNode devicePair in deviceList.Children) { string target = devicePair.FindKeyChildValue(Target.NAME); if (target == value) return true; } return false; }