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