public Scrapper(IConfiguration configuration, IHttpClientProvider http, INodeProcessor nodeParser, IGeoAreaFinder areaFinder) { _configuration = configuration; _http = http; _nodeProcessor = nodeParser; _areaFinder = areaFinder; }
public PuzzleProcessor( IFileUtility fileUtility, INodeProcessor nodeProcessor) { _fileUtility = fileUtility; _nodeProcessor = nodeProcessor; }
public WideTree(ISearchCollection <NodeModel> searchMode, INodeProcessor <NodeModel> nodeProcessor, IPrune prune, IThreadPool threadPool) { this.searchCollection = searchMode; this.visitors = new List <IVisitor>(); this.prune = prune; this.nodeProcessor = nodeProcessor; this.threadPool = threadPool; }
/** * Traverses through the {@link AssistStructure} and does something at each {@link ViewNode}. * * @param processor contains action to be performed on each {@link ViewNode}. */ public void Parse(INodeProcessor processor) { foreach (AssistStructure structure in mStructures) { int nodes = structure.WindowNodeCount; for (int i = 0; i < nodes; i++) { AssistStructure.ViewNode viewNode = structure.GetWindowNodeAt(i).RootViewNode; TraverseRoot(viewNode, processor); } } }
private void TraverseRoot(AssistStructure.ViewNode viewNode, INodeProcessor processor) { processor.ProcessNode(viewNode); int childrenSize = viewNode.ChildCount; if (childrenSize > 0) { for (int i = 0; i < childrenSize; i++) { TraverseRoot(viewNode.GetChildAt(i), processor); } } }
private static void ProcessNode(IAutowireContext context, INodeProcessor processor, Node node) { try { context.LogDebug("Processing {} on '{}'.", processor, node); processor.Process(context, node); } catch (Exception e) { context.LogError(e, "Failed to process {} on '{}'.", processor, node); } }
/// <summary> /// On the server, an easier way to obtain a parser is through the SaltarelleParserFactory class. /// </summary> public SaltarelleParser(INodeProcessor[] pluginNodeProcessors, IDictionary<string, ITypedMarkupParserImpl> pluginTypedMarkupParsers, IUntypedMarkupParserImpl[] pluginUntypedMarkupParsers) { #if CLIENT JsDictionary cfg = JsDictionary.GetDictionary(pluginNodeProcessors); if (!Script.IsNullOrUndefined(cfg) && cfg.ContainsKey("pluginNodeProcessors")) { // We have an [AlternateSignature] constructor which can cause us to be called with a config object instead of real parameters configObject = cfg; return; } #endif docProcessor = new DocumentProcessor(pluginNodeProcessors, new TypedMarkupParser(pluginTypedMarkupParsers), new UntypedMarkupParser(pluginUntypedMarkupParsers)); this.pluginNodeProcessors = pluginNodeProcessors ?? new INodeProcessor[0]; this.pluginTypedMarkupParsers = pluginTypedMarkupParsers ?? new Dictionary<string, ITypedMarkupParserImpl>(); this.pluginUntypedMarkupParsers = pluginUntypedMarkupParsers ?? new IUntypedMarkupParserImpl[0]; }
public MutationLibrary(IConnectionProcessor connectionProcessor, INodeProcessor nodeProcessor, IInnovationController innovationController) { _connectionProcessor = connectionProcessor; _nodeProcessor = nodeProcessor; _innovationController = innovationController; if (Mutations.Count != 0) { return; } BuildLibrary(); //_mutations = _mutations.OrderByDescending(m => m.GetWeight).ToList(); _totalWeight = (int)Mutations.Sum(m => m.GetWeight); }
public static void Start(string serviceName) { try { _serviceName = serviceName; #if DEBUG //IDbProvider dbProvider = DbProviderFactory.GetDbProvider("OracleClient-2.0"); //dbProvider.ConnectionString = "Data Source=ORA1;User Id=NODE_2008;Password=memorial;"; //SpringBaseDao springBaseDao = new SpringBaseDao(dbProvider); //springBaseDao.RowExists("NAccount", "*", "Id", "0000-0000-0000-0000-0000"); //FileTypeIdentifier.Test(); #endif // DEBUG SecurityUtils.EnableAllSecurityProtocols(); // TLS 1.2 support LOG = LogManagerEx.GetLogger(typeof(WNOSController)); CreateApplicationEventLog(); LogInfo("Calling ContextRegistry.GetContext()"); IApplicationContext ctx = ContextRegistry.GetContext(); LogInfo("Calling ConfigureRemoting()"); ConfigureRemoting(ctx); LogInfo("Locating centralProcessor"); _centralProcessor = (INodeProcessor)ctx["centralProcessor"]; if (_centralProcessor == null) { throw new System.Configuration.SettingsPropertyNotFoundException("centralProcessor"); } LogInfo("Starting centralProcessor"); _centralProcessor.Start(); LogInfo("Exit WNOSController.Start()"); } catch (Exception e) { LogError(e, "Exception thrown in WNOSController.Start()"); throw; } }
private INode RunProcessor(INode node, INodeProcessor processor, ParseData data, string scope) { // If the node can be processed, don't touch subnodes - the processor can invoke RunProcessors if it's needed. if (processor.ShouldProcess(node, scope)) { var result = processor.Process(this, data, node, scope).ToList(); return(result.Count == 1 ? result[0] : new NodeCollection(result)); } var children = node.GetChildren(); for (var i = 0; i < children.Count; i++) { var child = children[i]; var processed = RunProcessor(child, processor, data, scope); node.ReplaceChild(i, processed); } return(node); }
public int CompareTo(INodeProcessor other) => ProcessPhase.CompareTo(other.ProcessPhase);
public ObjectWriter(XmlWriter writer, INodeProcessor nodeProcessor) { this.writer = writer; this.nodeProcessor = nodeProcessor; }
public override void Process(INodeProcessor aProcessor) { aProcessor.Process(this); }
public virtual void Process(INodeProcessor aProcessor) { aProcessor.Process(this); }
public NetController(INetworkProcessor networkProcessor, INodeProcessor nodeProcessor, IConnectionProcessor connectionProcessor, IMutationController mutationController) => (_networkProcessor, _nodeProcessor, _connectionProcessor, _mutationController) = (networkProcessor, nodeProcessor, connectionProcessor, mutationController);
public NetworkProcessor(ISqlDataAccess sqlDataAccess, INodeProcessor nodeProcessor, IConnectionProcessor connectionProcessor) => (_sqlDataAccess, _nodeProcessor, _connectionProcessor) = (sqlDataAccess, nodeProcessor, connectionProcessor);
public NodeProcessorTests() { _wordUtility = new WordUtility(); _wordFilter = new WordFilter(); _nodeProcessor = new NodeProcessor(_wordFilter, _wordUtility); }
public AddNodeMutation(INodeProcessor nodeProcessor, IInnovationController innovationController, IConnectionProcessor connectionProcessor) { _nodeProcessor = nodeProcessor; _innovationController = innovationController; _connectionProcessor = connectionProcessor; }