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