Exemple #1
0
 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);
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 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;
 }