コード例 #1
0
ファイル: GraphBuilder.cs プロジェクト: devoctomy/cachy
        public Boolean Link(params String[] nodes)
        {
            String links = String.Join(",", nodes);

            DLoggerManager.Instance.Logger.Log(DFramework.Logging.Interfaces.LoggerMessageType.VerboseHigh | DFramework.Logging.Interfaces.LoggerMessageType.Information | DFramework.Logging.Interfaces.LoggerMessageType.Sensitive, String.IsNullOrEmpty(Name) ? String.Format("Linking GraphBuilder '{0}'.", links) : String.Format("Linking named GraphBuilder '{0}' with '{1}'.", Name, links));
            if (_nodes.Count > 1)
            {
                for (Int32 iNode = 0; iNode < (nodes.Length - 1); iNode++)
                {
                    IGraphNode curNode  = _nodes[nodes[iNode]];
                    IGraphNode nextNode = _nodes[nodes[iNode + 1]];
                    curNode.Connect(nextNode);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }