public void Add(Generator node) { if (ArrayTools.Contains(generators, node)) { throw new Exception("Could not add generator " + node + " since it is already in graph"); } ArrayTools.Add(ref generators, node); //cachedGuidLut = null; }
public void Add(Group grp) { if (ArrayTools.Contains(groups, grp)) { throw new Exception("Could not add group " + grp + " since it is already in graph"); } ArrayTools.Add(ref groups, grp); //cachedGuidLut = null; }
public void Remove(Group grp) { if (!ArrayTools.Contains(groups, grp)) { throw new Exception("Could not remove group " + grp + " since it is not in graph"); } ArrayTools.Remove(ref groups, grp); //cachedGuidLut = null; }
public void Remove(Generator node) { if (!ArrayTools.Contains(generators, node)) { throw new Exception("Could not remove generator " + node + " since it is not in graph"); } UnlinkGenerator(node); ArrayTools.Remove(ref generators, node); //cachedGuidLut = null; }