10 references to Not
Microsoft.CodeAnalysis.CSharp.Features (10)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (3)
188
Not
p => p.Pattern, // Avoid double negative
190
Binary { Left:
Not
left, Right:
Not
right } p // Apply demorgans's law
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (2)
48
return
Not
.TryCreate(ParseConstantPattern(op));
60
return
Not
.TryCreate(ParsePattern(op.Operand));
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (4)
113
case
Not
p:
145
Not
{ Pattern: Constant } => true,
146
Not
{ Pattern: Source { PatternSyntax: ConstantPatternSyntax } } => true,
147
Not
=> false,
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
104
Not
p => UnaryPattern(AsPatternSyntax(p.Pattern).Parenthesize()),