コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: ComAttrs.cs プロジェクト: code2X/dniPrints
 public void Process(LinkManager linkManager, INodeOutput outCom)
 {
     if (linkManager.RemoveLinkByBegin(outCom.ID))
     {
         Logger.Info(outCom.GetType().Name + " is SingleConncect");
     }
 }
コード例 #3
0
        void ProcessSingleConncect(INodeOutput outCom)
        {
            SingleConnect singleConnect = (SingleConnect)Attribute.GetCustomAttribute(outCom.GetType(), typeof(SingleConnect));

            if (singleConnect != null)
            {
                singleConnect.Process(m_NodeGraph.ngLinkManager, outCom);
            }
        }