106 references to CaseKind
Metrics (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Metrics.Legacy (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Microsoft.CodeAnalysis (17)
Generated\Operations.Generated.cs (2)
2678CaseKind CaseKind { get; } 8131public abstract CaseKind CaseKind { get; }
Operations\ControlFlowGraphBuilder.cs (5)
5547case CaseKind.SingleValue: 5602case CaseKind.Pattern: 5626case CaseKind.Relational: 5639case CaseKind.Default: 5653case CaseKind.Range:
Operations\OperationNodes.cs (10)
210public override CaseKind CaseKind => CaseKind.Range; 215public override CaseKind CaseKind => CaseKind.SingleValue; 220public override CaseKind CaseKind => CaseKind.Relational; 225public override CaseKind CaseKind => CaseKind.Default; 230public override CaseKind CaseKind => CaseKind.Pattern;
Microsoft.CodeAnalysis.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (6)
106case CaseKind.None: 107case CaseKind.Relational: 108case CaseKind.Range: 113case CaseKind.Default: 117case CaseKind.SingleValue: 137case CaseKind.Pattern:
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
89if (lastCase.Clauses.Any(static c => c.CaseKind == CaseKind.Default))
Microsoft.CodeAnalysis.Features (7)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (6)
106case CaseKind.None: 107case CaseKind.Relational: 108case CaseKind.Range: 113case CaseKind.Default: 117case CaseKind.SingleValue: 137case CaseKind.Pattern:
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
89if (lastCase.Clauses.Any(static c => c.CaseKind == CaseKind.Default))
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Microsoft.CodeAnalysis.Test.Utilities (11)
Compilation\OperationTreeVerifier.cs (1)
1830var kindStr = $"{nameof(CaseKind)}.{operation.CaseKind}";
Compilation\TestOperationVisitor.cs (5)
216Assert.Equal(CaseKind.SingleValue, operation.CaseKind); 229Assert.Equal(CaseKind.Relational, operation.CaseKind); 238Assert.Equal(CaseKind.Default, operation.CaseKind); 1580Assert.Equal(CaseKind.Pattern, operation.CaseKind); 1626Assert.Equal(CaseKind.Range, operation.CaseKind);
Diagnostics\OperationTestAnalyzer.cs (5)
350case CaseKind.SingleValue: 369case CaseKind.Range: 393case CaseKind.Relational: 440case CaseKind.Default: 903if (caseClause.CaseKind == CaseKind.Default)
Roslyn.Diagnostics.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,
Text.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (8)
28ImmutableHashSet<BinaryOperatorKind>.Empty, ImmutableHashSet<UnaryOperatorKind>.Empty, ImmutableHashSet<CaseKind>.Empty, ImmutableHashSet<ISymbol>.Empty, ImmutableHashSet<object>.Empty); 35private readonly ImmutableHashSet<CaseKind> _distinctCaseKinds; 48ImmutableHashSet<CaseKind> distinctCaseKinds, 74ImmutableHashSet<CaseKind> distinctCaseKinds, 100ImmutableHashSet<CaseKind>.Builder? distinctCaseKindsBuilder = null; 224distinctCaseKindsBuilder ??= ImmutableHashSet.CreateBuilder<CaseKind>(); 226if (caseClauseOperation.CaseKind == CaseKind.Relational) 295distinctCaseKindsBuilder != null ? distinctCaseKindsBuilder.ToImmutable() : ImmutableHashSet<CaseKind>.Empty,