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
138 references to ILabelSymbol
Microsoft.CodeAnalysis (44)
Generated\Operations.Generated.cs (36)
135ILabelSymbol ExitLabel { get; } 168ILabelSymbol ContinueLabel { get; } 172ILabelSymbol ExitLabel { get; } 344ILabelSymbol Label { get; } 373ILabelSymbol Target { get; } 490ILabelSymbol? ExitLabel { get; } 2679ILabelSymbol? Label { get; } 2714new ILabelSymbol Label { get; } 4110internal SwitchOperation(ImmutableArray<ILocalSymbol> locals, IOperation value, ImmutableArray<ISwitchCaseOperation> cases, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4121public ILabelSymbol ExitLabel { get; } 4180protected BaseLoopOperation(IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4191public ILabelSymbol ContinueLabel { get; } 4192public ILabelSymbol ExitLabel { get; } 4196internal 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) 4286internal 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) 4378internal 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) 4490internal WhileLoopOperation(IOperation? condition, bool conditionIsTop, bool conditionIsUntil, IOperation? ignoredCondition, IOperation body, ImmutableArray<ILocalSymbol> locals, ILabelSymbol continueLabel, ILabelSymbol exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4514internal LabeledOperation(ILabelSymbol label, IOperation? operation, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4520public ILabelSymbol Label { get; } 4567internal BranchOperation(ILabelSymbol target, BranchKind branchKind, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4573public ILabelSymbol Target { get; } 4717internal TryOperation(IBlockOperation body, ImmutableArray<ICatchClauseOperation> catches, IBlockOperation? @finally, ILabelSymbol? exitLabel, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4728public ILabelSymbol? ExitLabel { get; } 8123protected BaseCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8129public ILabelSymbol? Label { get; } 8133internal DefaultCaseClauseOperation(ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8147internal PatternCaseClauseOperation(ILabelSymbol label, IPatternOperation pattern, IOperation? guard, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8153public new ILabelSymbol Label => base.Label!; 8210internal RangeCaseClauseOperation(IOperation minimumValue, IOperation maximumValue, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8272internal RelationalCaseClauseOperation(IOperation value, BinaryOperatorKind relation, ILabelSymbol? label, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 8325internal 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) 3857public void VisitLabel(ILabelSymbol operation) 3870private BasicBlockBuilder GetLabeledOrNewBlock(ILabelSymbol? labelOpt) 3881_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)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
72/// Interior-method-level symbols (i.e. <see cref="ILabelSymbol"/>, <see cref="ILocalSymbol"/>, <see 316ILabelSymbol => true,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
350public override void VisitLabel(ILabelSymbol labelSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (2)
442if (symbol is ILabelSymbol && newSymbol is ILabelSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
121SymbolKind.Label => LabelsAreEquivalent((ILabelSymbol)x, (ILabelSymbol)y), 159private static bool LabelsAreEquivalent(ILabelSymbol x, ILabelSymbol y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
63SymbolKind.Label => CombineHashCodes((ILabelSymbol)x, currentHash), 96private static int CombineHashCodes(ILabelSymbol x, int currentHash)
Microsoft.CodeAnalysis.CSharp (28)
Compilation\CSharpSemanticModel.cs (2)
3175public abstract ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)); 3183public abstract ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (2)
751public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 777public override ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (2)
345public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 350public override ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (2)
1882public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1896public override ILabelSymbol GetDeclaredSymbol(SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
CSharpExtensions.cs (2)
1526public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1535public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, SwitchLabelSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Operations\CSharpOperationFactory.cs (14)
1762ILabelSymbol target = boundContinueStatement.Label.GetPublicSymbol(); 1771ILabelSymbol target = boundBreakStatement.Label.GetPublicSymbol(); 1788ILabelSymbol target = boundGotoStatement.Label.GetPublicSymbol(); 1820ILabelSymbol continueLabel = boundWhileStatement.ContinueLabel.GetPublicSymbol(); 1821ILabelSymbol exitLabel = boundWhileStatement.BreakLabel.GetPublicSymbol(); 1833ILabelSymbol continueLabel = boundDoStatement.ContinueLabel.GetPublicSymbol(); 1834ILabelSymbol exitLabel = boundDoStatement.BreakLabel.GetPublicSymbol(); 1851ILabelSymbol continueLabel = boundForStatement.ContinueLabel.GetPublicSymbol(); 1852ILabelSymbol exitLabel = boundForStatement.BreakLabel.GetPublicSymbol(); 1958ILabelSymbol continueLabel = boundForEachStatement.ContinueLabel.GetPublicSymbol(); 1959ILabelSymbol exitLabel = boundForEachStatement.BreakLabel.GetPublicSymbol(); 2162ILabelSymbol label = boundLabelStatement.Label.GetPublicSymbol(); 2170ILabelSymbol label = boundLabeledStatement.Label.GetPublicSymbol(); 2626ILabelSymbol exitLabel = boundSwitchStatement.BreakLabel.GetPublicSymbol();
SymbolDisplay\SymbolDisplayVisitor.cs (1)
327public override void VisitLabel(ILabelSymbol symbol)
Symbols\PublicModel\LabelSymbol.cs (1)
21IMethodSymbol ILabelSymbol.ContainingMethod
Symbols\SymbolExtensions.cs (2)
641internal static ILabelSymbol? GetPublicSymbol(this LabelSymbol? symbol) 643return symbol.GetPublicSymbol<ILabelSymbol>();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\GotoTest.cs (2)
1149var symbol = model.GetDeclaredSymbol(label); 1162var symbol = model.GetDeclaredSymbol(label);
Microsoft.CodeAnalysis.CSharp.Features (1)
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
83var target = gotoOperation.Target;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ScriptSemanticsTests.cs (1)
523var symbol0 = model.GetDeclaredSymbol((LabeledStatementSyntax)statements[0]);
Semantics\TopLevelStatementsTests.cs (5)
2427var declSymbol = model1.GetDeclaredSymbol(labelDecl); 4896var label = model.GetDeclaredSymbol(declarator); 4950var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single()); 4956var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single()); 4981var 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)
224case 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)
208if (symbol is ILabelSymbol)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
40public override void VisitLabel(ILabelSymbol symbol)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
323else if (symbol is ILabelSymbol label) 610private 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)
2522Public 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 1248Dim continueLabel As ILabelSymbol = boundForEachStatement.ContinueLabel 1249Dim exitLabel As ILabelSymbol = boundForEachStatement.ExitLabel 1267Dim exitLabel As ILabelSymbol = boundTryStatement.ExitLabelOpt 1348Dim continueLabel As ILabelSymbol = boundWhileStatement.ContinueLabel 1349Dim exitLabel As ILabelSymbol = boundWhileStatement.ExitLabel 1381Dim label As ILabelSymbol = boundLabelStatement.Label 1389Dim target As ILabelSymbol = boundGotoStatement.Label 1397Dim target As ILabelSymbol = boundContinueStatement.Label 1405Dim target As ILabelSymbol = boundExitStatement.Label
SymbolDisplay\SymbolDisplayVisitor.vb (1)
185Public 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)
FindSymbols\FindReferences\Finders\LabelSymbolReferenceFinder.cs (1)
7internal sealed class LabelSymbolReferenceFinder : AbstractMemberScopedReferenceFinder<ILabelSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
72/// Interior-method-level symbols (i.e. <see cref="ILabelSymbol"/>, <see cref="ILocalSymbol"/>, <see 316ILabelSymbol => true,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
350public override void VisitLabel(ILabelSymbol labelSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (2)
442if (symbol is ILabelSymbol && newSymbol is ILabelSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
121SymbolKind.Label => LabelsAreEquivalent((ILabelSymbol)x, (ILabelSymbol)y), 159private static bool LabelsAreEquivalent(ILabelSymbol x, ILabelSymbol y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
63SymbolKind.Label => CombineHashCodes((ILabelSymbol)x, currentHash), 96private static int CombineHashCodes(ILabelSymbol x, int currentHash)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SymbolKeyTests.cs (2)
564var symbols = GetDeclaredSymbols(compilation).OfType<IMethodSymbol>().SelectMany(ms => GetInteriorSymbols(ms, compilation).OfType<ILabelSymbol>()).ToList(); 1409Assert.True(symbols.Any(s => s is ILabelSymbol));