public void Register(string name, params string[] dependsOn) { _definitions[name] = new NodeDefinition() { Name = name, DependsOn = dependsOn.ToList() }; }
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); }
public BaseNode(IDataDriver <TDataItem> driver, NodeDefinition nodeDefinition) { _driver = driver; _nodeDefinition = nodeDefinition; }
public void Register(string name, NodeDefinition definition) { _definitions[name] = definition; }