/* Get the code issues in the given node of the given document. */ public IEnumerable<CodeIssue> GetCodeIssues(IDocument document, SyntaxNode node) { // Create a work item for this task. var item = new GetDocumentNodeCodeIssueWorkItem(document, node, codeIssueComputers); new WorkItemSynchronizedExecutor(item, queue).Execute(); return item.GetCodeIssues(); }
/// <summary> /// Get the code issues in the given node of the given document. /// </summary> /// <param name="document"></param> /// <param name="node"></param> /// <returns></returns> public IEnumerable<CodeIssue> GetCodeIssues(IDocument document, SyntaxNode node) { // Check if an issue is likely to happen to the node. if (nodeFilter.Any(f => f.Invoke(node))) { // Create a work item for this task. var item = new GetDocumentNodeCodeIssueWorkItem(document, node, codeIssueComputers); new WorkItemSynchronizedExecutor(item, queue).Execute(); return item.GetCodeIssues(); } return Enumerable.Empty<CodeIssue>(); }