bool ProcessConncectTypes(INodeInput inCom, INodeOutput outCom) { ConnectTypes connectTypes; Type inComType = inCom.GetType(); Type outComType = outCom.GetType(); connectTypes = (ConnectTypes)Attribute.GetCustomAttribute(inComType, typeof(ConnectTypes)); if (connectTypes != null) { if (connectTypes.Contains(outComType) == false) { Logger.Info(inCom.Name + " Can't Connect Type: " + outCom.Name); return(false); } } connectTypes = (ConnectTypes)Attribute.GetCustomAttribute(outComType, typeof(ConnectTypes)); if (connectTypes != null) { if (connectTypes.Contains(inComType) == false) { Logger.Info(outComType.Name + " Can't Connect Type: " + inComType.Name); return(false); } } return(true); }
public void Process(LinkManager linkManager, INodeOutput outCom) { if (linkManager.RemoveLinkByBegin(outCom.ID)) { Logger.Info(outCom.GetType().Name + " is SingleConncect"); } }
void ProcessSingleConncect(INodeOutput outCom) { SingleConnect singleConnect = (SingleConnect)Attribute.GetCustomAttribute(outCom.GetType(), typeof(SingleConnect)); if (singleConnect != null) { singleConnect.Process(m_NodeGraph.ngLinkManager, outCom); } }