Contains() public static method

public static Contains ( Diagnostic diag ) : bool
diag Diagnostic
return bool
Example #1
0
        public static IEnumerable <Diagnostic> Find(ITextBuffer buffer)
        {
            ITextDocument document;

            if (!buffer.Properties.TryGetProperty(typeof(ITextDocument), out document) || document == null)
            {
                return(Enumerable.Empty <Diagnostic>());
            }

            ClangServices.Process(buffer);
            ErrorList.ClearDiagnosticsFromFile(document.FilePath);

            var diags = (from diag in ClangServices.GetDiagnostics(buffer)
                         where DiagnosticsBlacklist.Contains(diag) == false &&
                         !diag.FilePath.Any(c => Path.GetInvalidPathChars().Contains(c)) &&
                         Path.GetFileName(diag.FilePath) == Path.GetFileName(document.FilePath)
                         select diag).ToList();

            ErrorList.Show(diags);
            return(diags);
        }