46 references to Identifier
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder_Statements.cs (3)
556
MessageID.IDS_FeatureLocalFunctions.CheckFeatureAvailability(diagnostics, node.
Identifier
);
559
var localSymbol = this.LookupLocalFunction(node.
Identifier
);
564
ReportFieldContextualKeywordConflictIfAny(localSymbol, node, node.
Identifier
, diagnostics);
Binder\LocalBinderFactory.cs (1)
455
if (candidate.GetFirstLocation() == node.
Identifier
.GetLocation())
Compilation\MemberSemanticModel.cs (2)
371
LocalFunctionSymbol function = GetDeclaredLocalFunction(binder, ownerOfTypeParametersInScope.
Identifier
);
717
var originalSymbol = GetDeclaredLocalFunction(this.GetEnclosingBinder(GetAdjustedNodePosition(declarationSyntax)), declarationSyntax.
Identifier
);
Symbols\Source\LocalFunctionSymbol.cs (5)
144
addTo.Add(ErrorCode.WRN_MainIgnored, Syntax.
Identifier
.GetLocation(), this);
336
public override string Name => Syntax.
Identifier
.ValueText ?? "";
338
public SyntaxToken NameToken => Syntax.
Identifier
;
342
public override ImmutableArray<Location> Locations => ImmutableArray.Create(Syntax.
Identifier
.GetLocation());
344
public override Location TryGetFirstLocation() => Syntax.
Identifier
.GetLocation();
Syntax.xml.Main.Generated.cs (1)
1834
=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.ReturnType) ?? throw new ArgumentNullException("returnType"), VisitToken(node.
Identifier
), (TypeParameterListSyntax?)Visit(node.TypeParameterList), (ParameterListSyntax?)Visit(node.ParameterList) ?? throw new ArgumentNullException("parameterList"), VisitList(node.ConstraintClauses), (BlockSyntax?)Visit(node.Body), (ArrowExpressionClauseSyntax?)Visit(node.ExpressionBody), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (10)
6395
if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || returnType != this.ReturnType || identifier != this.
Identifier
|| typeParameterList != this.TypeParameterList || parameterList != this.ParameterList || constraintClauses != this.ConstraintClauses || body != this.Body || expressionBody != this.ExpressionBody || semicolonToken != this.SemicolonToken)
6406
public new LocalFunctionStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
6407
public LocalFunctionStatementSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
6408
public LocalFunctionStatementSyntax WithReturnType(TypeSyntax returnType) => Update(this.AttributeLists, this.Modifiers, returnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
6410
public LocalFunctionStatementSyntax WithTypeParameterList(TypeParameterListSyntax? typeParameterList) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, typeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
6411
public LocalFunctionStatementSyntax WithParameterList(ParameterListSyntax parameterList) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, parameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
6412
public LocalFunctionStatementSyntax WithConstraintClauses(SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, constraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
6413
public LocalFunctionStatementSyntax WithBody(BlockSyntax? body) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, body, this.ExpressionBody, this.SemicolonToken);
6414
public LocalFunctionStatementSyntax WithExpressionBody(ArrowExpressionClauseSyntax? expressionBody) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, expressionBody, this.SemicolonToken);
6415
public LocalFunctionStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, semicolonToken);
Syntax\LookupPosition.cs (1)
251
var firstNameToken = localFunction.
Identifier
;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
54
localFunction.
Identifier
.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\OutVarTests.cs (3)
36416
Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.
Identifier
.ValueText == "M2").Single()));
36498
Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.
Identifier
.ValueText == "M2").Single()));
36571
Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.
Identifier
.ValueText == "M2").Single()));
Microsoft.CodeAnalysis.CSharp.Features (4)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1837
return lfd.
Identifier
.Span;
EditAndContinue\SyntaxComparer.cs (1)
1033
identifier = localFunction.
Identifier
;
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
456
var localFunctionIdentifiers = localFunctions.Select(node => ((LocalFunctionStatementSyntax)node).
Identifier
.ValueText);
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
54
localFunction.
Identifier
.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EditAndContinue\SyntaxUtilitiesTests.cs (3)
184
var f1 = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(m => m.
Identifier
.ValueText == "f1");
185
var f2 = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(m => m.
Identifier
.ValueText == "f2");
250
var f = m2.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(m => m.
Identifier
.ValueText == "f");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\NullableReferenceTypesTests.cs (2)
65933
Assert.Equal("target", function1.
Identifier
.ValueText);
65937
Assert.Equal("target", function2.
Identifier
.ValueText);
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (3)
335
step => Assert.True(step.Outputs.Single().Value is LocalFunctionStatementSyntax {
Identifier
.ValueText: "LocalFunc" }));
371
step => Assert.True(step.Outputs.Single().Value is LocalFunctionStatementSyntax {
Identifier
.ValueText: "LocalFunc" }));
410
step => Assert.True(step.Outputs.Single().Value is LocalFunctionStatementSyntax {
Identifier
.ValueText: "LocalFunc" }));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Generated\Syntax.Test.xml.Generated.cs (2)
12398
Assert.Equal(SyntaxKind.IdentifierToken, node.
Identifier
.Kind());
12405
var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithReturnType(node.ReturnType).WithIdentifier(node.
Identifier
).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithConstraintClauses(node.ConstraintClauses).WithBody(node.Body).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
Parsing\LocalFunctionParsingTests.cs (2)
1352
Assert.Equal("local", s1.
Identifier
.ToString());
1362
Assert.Equal("local", s1.
Identifier
.ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\ClassificationHelpers.cs (1)
224
else if (token.Parent is LocalFunctionStatementSyntax localFunctionStatement && localFunctionStatement.
Identifier
== token)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
190
localFunction.
Identifier
.ValueText, GetMethodSuffix(localFunction),
197
localFunction.
Identifier
.Span,