コード例 #1
0
 public void Register(string name, params string[] dependsOn)
 {
     _definitions[name] = new NodeDefinition()
     {
         Name      = name,
         DependsOn = dependsOn.ToList()
     };
 }
コード例 #2
0
        private bool DoStep(IDataItemWrapper <TDataItem> dataItemWrapper, NodeDefinition nodeDefinition)
        {
            if (nodeDefinition.RunOver && !_excludeSubTree)
            {
                RunOnSubTree(nodeDefinition.Name);
                return(true);
            }
            var node = _registry.GetNode(nodeDefinition.Name);

            bool isOver = false;

            foreach (var dependsOn in nodeDefinition.DependsOn)
            {
                var next = _provider.GetByName(dependsOn);
                isOver |= DoStep(dataItemWrapper, next);
            }
            isOver |= node.Process(dataItemWrapper);

            return(isOver);
        }
コード例 #3
0
 public BaseNode(IDataDriver <TDataItem> driver, NodeDefinition nodeDefinition)
 {
     _driver         = driver;
     _nodeDefinition = nodeDefinition;
 }
コード例 #4
0
 public void Register(string name, NodeDefinition definition)
 {
     _definitions[name] = definition;
 }