示例#1
0
        // 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);
        }
示例#2
0
        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);
        }
示例#3
0
 public bool Find(Serialization.Link link)
 {
     return(link.inId == _id || link.outId == _id);
 }
示例#4
0
 public void RmvLink(Serialization.Link link)
 {
     Links.Remove(link);
 }