282 references to Identifier
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
99
methodName = method.
Identifier
.ValueText;
Microsoft.Analyzers.Extra (2)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (2)
178
var matchName = method.
Identifier
.ToString() == methodName;
225
return (method.
Identifier
.ToString(), true);
Microsoft.CodeAnalysis.CSharp (20)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
475
return ExplicitInterfaceHelpers.GetMemberName(outerBinder, baseMethodDeclarationSyntax.Modifiers, methodDeclSyntax.ExplicitInterfaceSpecifier, methodDeclSyntax.
Identifier
.ValueText);
Compilation\CSharpSemanticModel.cs (1)
468
position = methodDecl.
Identifier
.SpanStart;
Compilation\SyntaxTreeSemanticModel.cs (1)
1656
return GetDeclarationName(declaration, methodDecl.Modifiers, methodDecl.ExplicitInterfaceSpecifier, methodDecl.
Identifier
.ValueText);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5567
new SourceLocation(methodSyntax.
Identifier
));
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
31
var nameToken = syntax.
Identifier
;
239
var identifier = (typeDecl != null) ? typeDecl.Identifier : syntax.
Identifier
;
1062
return this.FindExplicitlyImplementedMethod(isOperator: false, _explicitInterfaceType, syntax.
Identifier
.ValueText, syntax.ExplicitInterfaceSpecifier, diagnostics);
Syntax.xml.Main.Generated.cs (1)
2059
=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.ReturnType) ?? throw new ArgumentNullException("returnType"), (ExplicitInterfaceSpecifierSyntax?)Visit(node.ExplicitInterfaceSpecifier), 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 (11)
12367
if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || returnType != this.ReturnType || explicitInterfaceSpecifier != this.ExplicitInterfaceSpecifier || identifier != this.
Identifier
|| typeParameterList != this.TypeParameterList || parameterList != this.ParameterList || constraintClauses != this.ConstraintClauses || body != this.Body || expressionBody != this.ExpressionBody || semicolonToken != this.SemicolonToken)
12378
public new MethodDeclarationSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12380
public new MethodDeclarationSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12381
public MethodDeclarationSyntax WithReturnType(TypeSyntax returnType) => Update(this.AttributeLists, this.Modifiers, returnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12382
public MethodDeclarationSyntax WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifierSyntax? explicitInterfaceSpecifier) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, explicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12384
public MethodDeclarationSyntax WithTypeParameterList(TypeParameterListSyntax? typeParameterList) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, typeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12386
public new MethodDeclarationSyntax WithParameterList(ParameterListSyntax parameterList) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, parameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12387
public MethodDeclarationSyntax WithConstraintClauses(SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, constraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken);
12389
public new MethodDeclarationSyntax WithBody(BlockSyntax? body) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, body, this.ExpressionBody, this.SemicolonToken);
12391
public new MethodDeclarationSyntax WithExpressionBody(ArrowExpressionClauseSyntax? expressionBody) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, expressionBody, this.SemicolonToken);
12393
public new MethodDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.
Identifier
, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, semicolonToken);
Syntax\LookupPosition.cs (1)
222
var firstNameToken = explicitInterfaceSpecifier == null ? methodDecl.
Identifier
: explicitInterfaceSpecifier.GetFirstToken();
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
34
return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.
Identifier
.GetLocation();
60
methodDeclaration.
Identifier
.ValueText != WellKnownMemberNames.EntryPointMethodName ||
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
196
MethodDeclarationSyntax methodDeclaration => methodDeclaration.
Identifier
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
54
return ((MethodDeclarationSyntax)member).
Identifier
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
55
identifierToken = methodDeclaration.
Identifier
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206
EqualIdentifierName(x.
Identifier
, y.
Identifier
, out result);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenOperators.cs (3)
5413
ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Calculate").Single()));
5703
ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Calculate").Single()));
5739
ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Calculate").Single()));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (104)
Attributes\AttributeTests_RefReadOnly.cs (4)
1379
var userFunction = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(method => method.
Identifier
.Text == "User");
1421
var userFunction = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(method => method.
Identifier
.Text == "User");
1450
var userFunction = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(method => method.
Identifier
.Text == "User");
1477
var userFunction = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(method => method.
Identifier
.Text == "User");
Diagnostics\GetDiagnosticsTests.cs (1)
1153
MethodDeclarationSyntax methodDecl => methodDecl.
Identifier
.GetLocation(),
RefStructInterfacesTests.cs (59)
6629
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
6766
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
6882
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
7014
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
7143
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
7473
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
7663
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
7882
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
8076
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
8269
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
8442
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
8548
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
8932
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
9136
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
9332
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
9500
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
9715
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
9936
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
10151
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
10348
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
10443
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
10543
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
10740
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
10980
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
11199
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
11423
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
12547
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
12815
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
13060
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
13323
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
13590
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
13852
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
14550
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
14891
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
15253
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
15604
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
15952
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
16131
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
16386
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
17157
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17222
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17287
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17371
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17459
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17552
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17649
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
17733
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
18054
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
18251
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
18474
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
18674
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
18875
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
19051
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
19159
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
19527
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
19698
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
19871
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
20023
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Main").Single();
20365
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test").Single();
Semantics\CollectionExpressionTests.cs (24)
9373
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
10096
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
10167
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
10251
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
10336
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28352
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28478
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28592
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28650
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28721
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28803
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28869
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
28930
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29000
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29175
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29240
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "CreateCollection");
29296
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29613
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29691
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29778
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29862
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
29955
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
30040
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
30108
var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.Text == "Create");
Semantics\ExtensionTests.cs (1)
51809
MethodDeclarationSyntax method => method.
Identifier
.ValueText,
Semantics\ParamsCollectionTests.cs (2)
3584
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
3874
var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == "Test1").Single();
Semantics\PrimaryConstructorTests.cs (6)
5003
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
5148
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
5216
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
6000
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
6092
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
6150
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
Semantics\RecordTests.cs (7)
1877
Assert.Equal("Main", main.
Identifier
.ToString());
8191
Assert.Equal("Main", main.
Identifier
.ToString());
8691
Assert.Equal("Main", main.
Identifier
.ToString());
8796
Assert.Equal("Main", main.
Identifier
.ToString());
27430
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
27575
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
27643
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
Microsoft.CodeAnalysis.CSharp.Features (14)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
68
_memberBuilder.Add(new CodeLensMember(node, node.
Identifier
.Span));
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
336
MethodDeclarationSyntax method => [.. namedType.GetMembers(method.
Identifier
.ValueText).OfType<IMethodSymbol>()],
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
241
identifier: otherMethod.
Identifier
,
EditAndContinue\SyntaxComparer.cs (1)
1459
return ((MethodDeclarationSyntax)node).
Identifier
;
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
162
MethodDeclarationSyntax member => (member, member.ExplicitInterfaceSpecifier, member.
Identifier
),
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
68
MethodDeclarationSyntax methodDeclarationNode => methodDeclarationNode.
Identifier
,
Organizing\Organizers\MethodDeclarationOrganizer.cs (1)
34
identifier: syntax.
Identifier
,
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
125
var nameToken = GetPropertyName(getMethodDeclaration.
Identifier
, propertyName, nameChanged);
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (2)
177
nameBuilder.Append(methodDeclaration.
Identifier
.ValueText);
195
methodDeclaration.
Identifier
));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
34
return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.
Identifier
.GetLocation();
60
methodDeclaration.
Identifier
.ValueText != WellKnownMemberNames.EntryPointMethodName ||
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
196
MethodDeclarationSyntax methodDeclaration => methodDeclaration.
Identifier
,
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
55
identifierToken = methodDeclaration.
Identifier
;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (11)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (1)
543
MethodDeclarationSyntax method => method.
Identifier
.Text,
Diagnostics\Suppression\SuppressionTests.cs (2)
1132
context.ReportDiagnostic(Diagnostic.Create(Descriptor, method.
Identifier
.GetLocation()));
2202
context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.
Identifier
.GetLocation()));
EditAndContinue\ActiveStatementTests.cs (1)
14328
if (node.Parent is MethodDeclarationSyntax methodDecl && methodDecl.
Identifier
.Text == "G")
EditAndContinue\SyntaxUtilitiesTests.cs (6)
179
var m0 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M0");
180
var m1 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M1");
181
var m2 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M2");
182
var m3 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M3");
248
var m1 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M1");
249
var m2 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M2");
Testing\CSharpTestMethodFinderTests.cs (1)
470
var testMethodNames = testMethods.Cast<MethodDeclarationSyntax>().Select(m => m.
Identifier
.Text).ToArray();
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IObjectCreationExpression.cs (1)
2400
var m = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\NullableContextTests.cs (1)
734
bool expectedAnalysis = expectedAnalyzedKeys.Contains(methodDeclaration.
Identifier
.Text);
Semantics\RecordStructTests.cs (3)
6657
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
6749
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
6807
case MethodDeclarationSyntax {
Identifier
: { ValueText: "M" } }:
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (8)
472
step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax {
Identifier
.ValueText: "M" }));
505
step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax {
Identifier
.ValueText: "M" }));
537
step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax {
Identifier
.ValueText: "M", Body: null, ExpressionBody: null }));
569
step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax {
Identifier
.ValueText: "M", Body: not null }));
1346
{ Value: MethodDeclarationSyntax {
Identifier
.ValueText: "SomeFunction" } },
1347
{ Value: MethodDeclarationSyntax {
Identifier
.ValueText: "SomeFunction2" } }]));
1392
{ Value: MethodDeclarationSyntax {
Identifier
.ValueText: "SomeFunction" } },
1393
{ Value: MethodDeclarationSyntax {
Identifier
.ValueText: "SomeFunction2" } }]));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\SemanticModelAPITests.cs (1)
43
var m = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(decl => decl.
Identifier
.ValueText == "M");
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2850
Assert.Equal("M", explicitMethodNode.
Identifier
.ValueText);
Symbols\Source\NullablePublicAPITests.cs (1)
3507
var mDeclaration = root.DescendantNodes().OfType<MethodDeclarationSyntax>().First(m => m.
Identifier
.ValueText == "M");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (35)
Generated\Syntax.Test.xml.Generated.cs (2)
13429
Assert.Equal(SyntaxKind.IdentifierToken, node.
Identifier
.Kind());
13436
var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithReturnType(node.ReturnType).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithIdentifier(node.
Identifier
).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithConstraintClauses(node.ConstraintClauses).WithBody(node.Body).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
Parsing\DeclarationParsingTests.cs (30)
2504
Assert.NotEqual(default, ms.
Identifier
);
2505
Assert.Equal("X", ms.
Identifier
.ToString());
2549
Assert.NotEqual(default, ms.
Identifier
);
2550
Assert.Equal("X", ms.
Identifier
.ToString());
2595
Assert.NotEqual(default, ms.
Identifier
);
2596
Assert.Equal("X", ms.
Identifier
.ToString());
2703
Assert.NotEqual(default, ms.
Identifier
);
2704
Assert.Equal("X", ms.
Identifier
.ToString());
2768
Assert.NotEqual(default, ms.
Identifier
);
2769
Assert.Equal("M", ms.
Identifier
.ToString());
2815
Assert.NotEqual(default, ms.
Identifier
);
2816
Assert.Equal("M", ms.
Identifier
.ToString());
2865
Assert.NotEqual(default, ms.
Identifier
);
2866
Assert.Equal("M", ms.
Identifier
.ToString());
3067
Assert.NotEqual(default, ms.
Identifier
);
3068
Assert.Equal("X", ms.
Identifier
.ToString());
3119
Assert.NotEqual(default, ms.
Identifier
);
3120
Assert.Equal("X", ms.
Identifier
.ToString());
3180
Assert.NotEqual(default, ms.
Identifier
);
3181
Assert.Equal("X", ms.
Identifier
.ToString());
3245
Assert.NotEqual(default, ms.
Identifier
);
3246
Assert.Equal("X", ms.
Identifier
.ToString());
3319
Assert.NotEqual(default, ms.
Identifier
);
3320
Assert.Equal("M", ms.
Identifier
.ToString());
3384
Assert.NotEqual(default, ms.
Identifier
);
3385
Assert.Equal("X", ms.
Identifier
.ToString());
3436
Assert.NotEqual(default, ms.
Identifier
);
3437
Assert.Equal("M", ms.
Identifier
.ToString());
3482
Assert.NotEqual(default, ms.
Identifier
);
3484
Assert.Equal("X", ms.
Identifier
.ToString());
Syntax\LambdaUtilitiesTests.cs (1)
57
var methodDef = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(d => d.
Identifier
.ValueText == "M").Single();
Syntax\SyntaxNodeTests.cs (2)
2156
var tokenLocation = method.
Identifier
.GetLocation();
2159
Assert.Equal(method.
Identifier
.Span, tokenLocation.SourceSpan);
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Classification\ClassificationHelpers.cs (1)
208
else if (token.Parent is MethodDeclarationSyntax methodDeclaration && methodDeclaration.
Identifier
== token)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
2057
MethodDeclarationSyntax methodDeclaration => methodDeclaration.
Identifier
.ValueText,
2084
MethodDeclarationSyntax methodDeclaration => ReplaceWithTrivia(declaration, methodDeclaration.
Identifier
, id),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
355
method.
Identifier
.ValueText, GetMethodSuffix(method),
362
method.
Identifier
.Span,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
54
return ((MethodDeclarationSyntax)member).
Identifier
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206
EqualIdentifierName(x.
Identifier
, y.
Identifier
, out result);
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SyntaxPathTests.cs (5)
166
Assert.Equal("M1", ((MethodDeclarationSyntax)n1).
Identifier
.ValueText);
169
Assert.Equal("M2", ((MethodDeclarationSyntax)n2).
Identifier
.ValueText);
172
Assert.Equal("M3", ((MethodDeclarationSyntax)n3).
Identifier
.ValueText);
238
Assert.Equal("M1", ((MethodDeclarationSyntax)n1).
Identifier
.ValueText);
241
Assert.Equal("M2", ((MethodDeclarationSyntax)n2).
Identifier
.ValueText);
Microsoft.DotNet.GenFacades (3)
NotSupportedAssemblyGenerator.cs (3)
122
if (node.
Identifier
.ValueText == "Dispose" || node.
Identifier
.ValueText == "Finalize")
215
private string GetMethodDefinition(MethodDeclarationSyntax node) => GetFullyQualifiedName((TypeDeclarationSyntax)node.Parent) + "." + node.
Identifier
.ValueText;
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Parser.cs (5)
256
Diag(DiagnosticDescriptors.MalformedFormatStrings, method.
Identifier
.GetLocation(), method.
Identifier
.ToString());
264
Diag(DiagnosticDescriptors.InvalidLoggingMethodName, method.
Identifier
.GetLocation());
278
Diag(DiagnosticDescriptors.LoggingMethodIsGeneric, method.
Identifier
.GetLocation());
330
Diag(DiagnosticDescriptors.RedundantQualifierInMessage, ma.GetLocation(), method.
Identifier
.ToString());
Microsoft.Gen.Logging (6)
Parsing\Parser.cs (6)
218
Diag(DiagDescriptors.LoggingMethodShouldBeStatic, method.
Identifier
.GetLocation());
234
Diag(DiagDescriptors.MissingLoggerMember, method.
Identifier
.GetLocation(), typeDec.Identifier.Text);
258
Diag(DiagDescriptors.EmptyLoggingMethod, method.
Identifier
.GetLocation(), methodSymbol.Name);
390
Diag(DiagDescriptors.MalformedFormatStrings, method.
Identifier
.GetLocation(), method.
Identifier
.ToString());
416
Diag(DiagDescriptors.LoggingMethodMustBePartial, method.
Identifier
.GetLocation());
Microsoft.Interop.ComInterfaceGenerator (8)
ComInterfaceGenerator.cs (1)
467
syntax.
Identifier
,
ComMethodInfo.cs (2)
74
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.
Identifier
.GetLocation(), method.Name);
80
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
VtableIndexStubGenerator.cs (5)
286
var methodSyntaxTemplate = new ContainingSyntax(syntax.Modifiers.StripAccessibilityModifiers(), SyntaxKind.MethodDeclaration, syntax.
Identifier
, syntax.TypeParameterList);
400
return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
408
return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, typeDecl.Identifier);
415
return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
421
return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.
Identifier
.GetLocation(), method.Name);
Microsoft.Interop.JavaScript.JSImportGenerator (8)
JSExportGenerator.cs (4)
206
var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.
Identifier
, originalSyntax.TypeParameterList);
462
return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
470
return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, typeDecl.Identifier);
477
return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
JSImportGenerator.cs (4)
189
var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.
Identifier
, originalSyntax.TypeParameterList);
371
return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
379
return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, typeDecl.Identifier);
386
return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator (4)
LibraryImportGenerator.cs (4)
322
var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.
Identifier
, originalSyntax.TypeParameterList);
562
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
568
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, nonPartialIdentifier);
574
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
DownlevelLibraryImportGenerator.cs (4)
216
var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.
Identifier
, originalSyntax.TypeParameterList);
420
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
426
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, nonPartialIdentifier);
432
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.SourceGeneration (2)
MethodSignatureDiagnosticLocations.cs (2)
57
: this(syntax.
Identifier
.Text, syntax.ParameterList.Parameters.Select(p => p.Identifier.GetLocation()).ToImmutableArray(), syntax.
Identifier
.GetLocation())
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
108
CheckPascal(node.
Identifier
, context);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (1)
812
((MethodDeclarationSyntax)node).
Identifier
.ToString();
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
395
startPosition = ((MethodDeclarationSyntax)node).
Identifier
.SpanStart;
958
endPosition = ((MethodDeclarationSyntax)node).
Identifier
.Span.End;
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (1)
202
builder.Append(methodDeclaration.
Identifier
.ValueText);
QuarantineTools.Tests (8)
ActiveIssueTests.cs (3)
87
var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M");
240
var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M");
283
var methodNodes = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == methodName).ToList();
QuarantineScriptTests.cs (5)
89
var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M");
141
var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.
Identifier
.ValueText == "M");
171
var aM = methods.First(m => m.
Identifier
.ValueText == "M" && GetEnclosingNames(m).Namespace == "N1");
172
var bM = methods.First(m => m.
Identifier
.ValueText == "M" && GetEnclosingNames(m).Namespace == "N2");
227
var methodNodes = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.
Identifier
.ValueText == methodName).ToList();
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
54
return ((MethodDeclarationSyntax)member).
Identifier
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206
EqualIdentifierName(x.
Identifier
, y.
Identifier
, out result);