10 references to Not
Microsoft.CodeAnalysis.CSharp.Features (10)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (3)
201
Not
p => p.Pattern, // Avoid double negative
203
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)
108
case
Not
p:
140
Not
{ Pattern: Constant } => true,
141
Not
{ Pattern: Source { PatternSyntax: ConstantPatternSyntax } } => true,
142
Not
=> false,
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
104
Not
p => UnaryPattern(AsPatternSyntax(p.Pattern).Parenthesize()),