private void ProcessDirectory(string directoryPath, ISpecification <NodeModelBase> specification, INodeFoundEventPublisher recursiveSearchResult) { var model = _directoryService.GetDirectory(directoryPath); if (specification.IsSatisfiedBy(model)) { recursiveSearchResult.RaiseNodeFoundEvent(directoryPath); } }
private static void ProcessNode(string nodePath, ISpecification <NodeModelBase> specification, INodeFoundEventPublisher publisher, Func <string, NodeModelBase> factory) { var model = factory(nodePath); if (specification.IsSatisfiedBy(model)) { publisher.RaiseNodeFoundEvent(nodePath); } }
private void ProcessFile(string filePath, ISpecification <NodeModelBase> specification, INodeFoundEventPublisher publisher) { var model = _fileService.GetFile(filePath); if (specification.IsSatisfiedBy(model)) { publisher.RaiseNodeFoundEvent(filePath); } }