// checks for invalid links public static bool InvalidLink(EB.Sequence.Component sequence, EB.Sequence.Serialization.Link link) { bool invalid = true; var nodeIn = sequence.FindById(link.inId); var nodeOut = sequence.FindById(link.outId); if ((nodeIn != null) && (nodeOut != null)) { invalid = EB.Sequence.Utils.ValidateLink(nodeOut, link.outName, nodeIn, link.inName) != Utils.ValidateLinkResult.Ok; } return(invalid); }
private Serialization.Link AddLink(int outId, string outName, int inId, string inName) { // Is there already a link here? if (FindLink(outId, outName, inId, inName) != null) { return(null); } var link = new Serialization.Link(); link.outId = outId; link.outName = outName; link.inId = inId; link.inName = inName; Links.Add(link); return(link); }
public bool Find(Serialization.Link link) { return(link.inId == _id || link.outId == _id); }
public void RmvLink(Serialization.Link link) { Links.Remove(link); }