2 implementations of ILabelSymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\LabelSymbol.cs (1)
9internal sealed class LabelSymbol : Symbol, ILabelSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\LabelSymbol.vb (1)
18Implements ILabelSymbol
137 references to ILabelSymbol
Microsoft.CodeAnalysis (44)
Generated\Operations.Generated.cs (36)
127ILabelSymbol ExitLabel { get; } 158ILabelSymbol ContinueLabel { get; } 162ILabelSymbol ExitLabel { get; } 324ILabelSymbol Label { get; } 351ILabelSymbol Target { get; } 460ILabelSymbol? ExitLabel { get; } 2478ILabelSymbol? Label { get; } 2511new ILabelSymbol Label { get; } 3740internal SwitchOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, ImmutableArray<ISwitchCaseOperation> cases, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3751public ILabelSymbol ExitLabel { get; } 3810protected BaseLoopOperation(IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3821public ILabelSymbol ContinueLabel { get; } 3822public ILabelSymbol ExitLabel { get; } 3826internal ForEachLoopOperation(IOperation loopControlVariable, IOperation collection, ImmutableArray<IOperation> nextVariables, ForEachLoopOperationInfo? info, bool isAsynchronous, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 3916internal ForLoopOperation(ImmutableArray<IOperation> before, ImmutableArray<ILocalSymbol> conditionLocals, IOperation? condition, ImmutableArray<IOperation> atLoopBottom, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4008internal ForToLoopOperation(IOperation loopControlVariable, IOperation initialValue, IOperation limitValue, IOperation stepValue, bool isChecked, ImmutableArray<IOperation> nextVariables, (ILocalSymbol LoopObject, ForToLoopOperationUserDefinedInfo UserDefinedInfo) info, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4120internal WhileLoopOperation(IOperation? condition, bool conditionIsTop, bool conditionIsUntil, IOperation? ignoredCondition, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4144internal LabeledOperation(ILabelSymbol label, IOperation? operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4150public ILabelSymbol Label { get; } 4197internal BranchOperation(ILabelSymbol target, BranchKind branchKind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4203public ILabelSymbol Target { get; } 4347internal TryOperation(IBlockOperation body, ImmutableArray<ICatchClauseOperation> catches, IBlockOperation? @finally, ILabelSymbol? exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4358public ILabelSymbol? ExitLabel { get; } 7753protected BaseCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7759public ILabelSymbol? Label { get; } 7763internal DefaultCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7777internal PatternCaseClauseOperation(ILabelSymbol label, IPatternOperation pattern, IOperation? guard, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7783public new ILabelSymbol Label => base.Label!; 7840internal RangeCaseClauseOperation(IOperation minimumValue, IOperation maximumValue, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7902internal RelationalCaseClauseOperation(IOperation value, BinaryOperatorKind relation, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 7955internal SingleValueCaseClauseOperation(IOperation value, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit)
Operations\ControlFlowGraphBuilder.cs (5)
37private PooledDictionary<ILabelSymbol, BasicBlockBuilder>? _labeledBlocks; 1186private static void CheckUnresolvedBranches(ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<ILabelSymbol, BasicBlockBuilder>? labeledBlocks) 3846public void VisitLabel(ILabelSymbol operation) 3859private BasicBlockBuilder GetLabeledOrNewBlock(ILabelSymbol? labelOpt) 3870_labeledBlocks = PooledDictionary<ILabelSymbol, BasicBlockBuilder>.GetInstance();
Symbols\SymbolVisitor.cs (1)
53public virtual void VisitLabel(ILabelSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
56public virtual TResult? VisitLabel(ILabelSymbol symbol)
Symbols\SymbolVisitor`2.cs (1)
61public virtual TResult VisitLabel(ILabelSymbol symbol, TArgument argument)
Microsoft.CodeAnalysis.CodeStyle (11)
AbstractSpeculationAnalyzer.cs (2)
415if (symbol is ILabelSymbol && newSymbol is ILabelSymbol)
SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
123SymbolKind.Label => LabelsAreEquivalent((ILabelSymbol)x, (ILabelSymbol)y), 161private static bool LabelsAreEquivalent(ILabelSymbol x, ILabelSymbol y)
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
66SymbolKind.Label => CombineHashCodes((ILabelSymbol)x, currentHash), 99private static int CombineHashCodes(ILabelSymbol x, int currentHash)
SymbolKey.cs (2)
72/// Interior-method-level symbols (i.e. <see cref="ILabelSymbol"/>, <see cref="ILocalSymbol"/>, <see 323ILabelSymbol => true,
SymbolKey.SymbolKeyWriter.cs (1)
350public override void VisitLabel(ILabelSymbol labelSymbol)
Microsoft.CodeAnalysis.CSharp (28)
Compilation\CSharpSemanticModel.cs (2)
3168public abstract ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)); 3176public abstract ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (2)
741public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 767public override ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (2)
341public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 346public override ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (2)
1869public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1883public override ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
CSharpExtensions.cs (2)
1503public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1512public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Operations\CSharpOperationFactory.cs (14)
1684ILabelSymbol target = boundContinueStatement.Label.GetPublicSymbol(); 1693ILabelSymbol target = boundBreakStatement.Label.GetPublicSymbol(); 1710ILabelSymbol target = boundGotoStatement.Label.GetPublicSymbol(); 1742ILabelSymbol continueLabel = boundWhileStatement.ContinueLabel.GetPublicSymbol(); 1743ILabelSymbol exitLabel = boundWhileStatement.BreakLabel.GetPublicSymbol(); 1755ILabelSymbol continueLabel = boundDoStatement.ContinueLabel.GetPublicSymbol(); 1756ILabelSymbol exitLabel = boundDoStatement.BreakLabel.GetPublicSymbol(); 1773ILabelSymbol continueLabel = boundForStatement.ContinueLabel.GetPublicSymbol(); 1774ILabelSymbol exitLabel = boundForStatement.BreakLabel.GetPublicSymbol(); 1876ILabelSymbol continueLabel = boundForEachStatement.ContinueLabel.GetPublicSymbol(); 1877ILabelSymbol exitLabel = boundForEachStatement.BreakLabel.GetPublicSymbol(); 2080ILabelSymbol label = boundLabelStatement.Label.GetPublicSymbol(); 2088ILabelSymbol label = boundLabeledStatement.Label.GetPublicSymbol(); 2544ILabelSymbol exitLabel = boundSwitchStatement.BreakLabel.GetPublicSymbol();
SymbolDisplay\SymbolDisplayVisitor.cs (1)
276public override void VisitLabel(ILabelSymbol symbol)
Symbols\PublicModel\LabelSymbol.cs (1)
21IMethodSymbol ILabelSymbol.ContainingMethod
Symbols\SymbolExtensions.cs (2)
635internal static ILabelSymbol? GetPublicSymbol(this LabelSymbol? symbol) 637return symbol.GetPublicSymbol<ILabelSymbol>();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\GotoTest.cs (2)
1040var symbol = model.GetDeclaredSymbol(label); 1053var symbol = model.GetDeclaredSymbol(label);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ScriptSemanticsTests.cs (1)
523var symbol0 = model.GetDeclaredSymbol((LabeledStatementSyntax)statements[0]);
Semantics\TopLevelStatementsTests.cs (5)
2415var declSymbol = model1.GetDeclaredSymbol(labelDecl); 4884var label = model.GetDeclaredSymbol(declarator); 4938var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single()); 4944var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single()); 4969var label = model.GetDeclaredSymbol(declarator);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\SymbolVisitorTests.cs (2)
88public override void VisitLabel(ILabelSymbol symbol) 264public override string VisitLabel(ILabelSymbol symbol)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
256case ILabelSymbol _:
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
AbstractTypeParameterChecker.cs (1)
136public sealed override void VisitLabel(ILabelSymbol symbol)
Microsoft.CodeAnalysis.Features (4)
FindUsages\AbstractFindUsagesService_FindReferences.cs (1)
209if (symbol is ILabelSymbol)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
43public override void VisitLabel(ILabelSymbol symbol)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
363else if (symbol is ILabelSymbol label) 649private void AddDescriptionForLabel(ILabelSymbol symbol)
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\OperationTreeVerifier.cs (3)
29private readonly Dictionary<ILabelSymbol, uint> _labelIdMap; 46_labelIdMap = new Dictionary<ILabelSymbol, uint>(); 280private uint GetLabelId(ILabelSymbol symbol)
Diagnostics\OperationTestAnalyzer.cs (2)
1449ILabelSymbol label = ((ILabeledOperation)operationContext.Operation).Label; 1463ILabelSymbol label = branch.Target;
Microsoft.CodeAnalysis.VisualBasic (18)
Compilation\SemanticModel.vb (1)
2518Public Overridable Overloads Function GetDeclaredSymbol(declarationSyntax As LabelStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ILabelSymbol
Operations\VisualBasicOperationFactory.vb (14)
1076Dim exitLabel As ILabelSymbol = boundSelectStatement.ExitLabel 1146Dim continueLabel As ILabelSymbol = boundDoLoopStatement.ContinueLabel 1147Dim exitLabel As ILabelSymbol = boundDoLoopStatement.ExitLabel 1167Dim continueLabel As ILabelSymbol = boundForToStatement.ContinueLabel 1168Dim exitLabel As ILabelSymbol = boundForToStatement.ExitLabel 1246Dim continueLabel As ILabelSymbol = boundForEachStatement.ContinueLabel 1247Dim exitLabel As ILabelSymbol = boundForEachStatement.ExitLabel 1265Dim exitLabel As ILabelSymbol = boundTryStatement.ExitLabelOpt 1346Dim continueLabel As ILabelSymbol = boundWhileStatement.ContinueLabel 1347Dim exitLabel As ILabelSymbol = boundWhileStatement.ExitLabel 1379Dim label As ILabelSymbol = boundLabelStatement.Label 1387Dim target As ILabelSymbol = boundGotoStatement.Label 1395Dim target As ILabelSymbol = boundContinueStatement.Label 1403Dim target As ILabelSymbol = boundExitStatement.Label
SymbolDisplay\SymbolDisplayVisitor.vb (1)
159Public Overrides Sub VisitLabel(symbol As ILabelSymbol)
Symbols\LabelSymbol.vb (1)
111Friend ReadOnly Property ILabelSymbol_ContainingMethod As IMethodSymbol Implements ILabelSymbol.ContainingMethod
VisualBasicExtensions.vb (1)
941Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As LabelStatementSyntax, Optional cancellationToken As CancellationToken = Nothing) As ILabelSymbol
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (1)
1179ByRef syntax As LabelStatementSyntax) As ILabelSymbol
Microsoft.CodeAnalysis.Workspaces (12)
AbstractSpeculationAnalyzer.cs (2)
415if (symbol is ILabelSymbol && newSymbol is ILabelSymbol)
FindSymbols\FindReferences\Finders\LabelSymbolReferenceFinder.cs (1)
9internal sealed class LabelSymbolReferenceFinder : AbstractMemberScopedReferenceFinder<ILabelSymbol>
SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
123SymbolKind.Label => LabelsAreEquivalent((ILabelSymbol)x, (ILabelSymbol)y), 161private static bool LabelsAreEquivalent(ILabelSymbol x, ILabelSymbol y)
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
66SymbolKind.Label => CombineHashCodes((ILabelSymbol)x, currentHash), 99private static int CombineHashCodes(ILabelSymbol x, int currentHash)
SymbolKey.cs (2)
72/// Interior-method-level symbols (i.e. <see cref="ILabelSymbol"/>, <see cref="ILocalSymbol"/>, <see 323ILabelSymbol => true,
SymbolKey.SymbolKeyWriter.cs (1)
350public override void VisitLabel(ILabelSymbol labelSymbol)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SymbolKeyTests.cs (2)
493var symbols = GetDeclaredSymbols(compilation).OfType<IMethodSymbol>().SelectMany(ms => GetInteriorSymbols(ms, compilation).OfType<ILabelSymbol>()).ToList(); 1338Assert.True(symbols.Any(s => s is ILabelSymbol));