public void AddUnit(TopologyUnit unit)
 {
     if (topologyUnits.ContainsKey(unit.PrimaryKey))
     {
         throw new ArgumentException("Add Error: The target is already exist in upperStreamUnits!");
     }
     else
     {
         topologyUnits.Add(unit.PrimaryKey, unit);
     }
 }
Exemple #2
0
 public void RemoveFromDownStreamUnits(TopologyUnit unit)
 {
     if (!downStreamUnits.ContainsKey(unit.PrimaryKey))
     {
         throw new ArgumentException("Remove Error: The target is not exist in upperStreamUnits!");
     }
     else
     {
         downStreamUnits.Remove(unit.PrimaryKey);
     }
 }