1 implementation of Guard
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
8158public IOperation? Guard { get; }
15 references to Guard
Microsoft.CodeAnalysis (2)
Operations\ControlFlowGraphBuilder.cs (2)
5615if (patternClause.Guard != null) 5618VisitConditionalBranch(patternClause.Guard, ref nextCase, jumpIfTrue: false);
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
52else if (clause is IPatternCaseClauseOperation { Guard: null, Pattern: IConstantPatternOperation constantPattern } &&
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (3)
41if (patternCaseClause.Guard is null) 44if (patternCaseClause.Guard.ConstantValue.Value is true) 200case IPatternCaseClauseOperation { Pattern: var pattern, Guard: null }:
Microsoft.CodeAnalysis.Features (4)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
52else if (clause is IPatternCaseClauseOperation { Guard: null, Pattern: IConstantPatternOperation constantPattern } &&
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (3)
41if (patternCaseClause.Guard is null) 44if (patternCaseClause.Guard.ConstantValue.Value is true) 200case IPatternCaseClauseOperation { Pattern: var pattern, Guard: null }:
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\OperationTreeVerifier.cs (3)
2069if (operation.Guard != null) 2070Visit(operation.Guard, nameof(operation.Guard));
Compilation\TestOperationVisitor.cs (2)
1583if (operation.Guard != null) 1585AssertEx.Equal(new[] { operation.Pattern, operation.Guard }, operation.ChildOperations);