102 references to Identifier
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
99methodName = method.Identifier.ValueText;
Microsoft.Analyzers.Extra (2)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (2)
178var matchName = method.Identifier.ToString() == methodName; 225return (method.Identifier.ToString(), true);
Microsoft.CodeAnalysis.CSharp (20)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2071=> 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));
_generated\2\Syntax.xml.Syntax.Generated.cs (11)
12413if (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) 12424public 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); 12426public 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); 12427public 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); 12428public 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); 12430public 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); 12432public 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); 12433public 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); 12435public 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); 12437public 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); 12439public 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);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
475return ExplicitInterfaceHelpers.GetMemberName(outerBinder, baseMethodDeclarationSyntax.Modifiers, methodDeclSyntax.ExplicitInterfaceSpecifier, methodDeclSyntax.Identifier.ValueText);
Compilation\CSharpSemanticModel.cs (1)
469position = methodDecl.Identifier.SpanStart;
Compilation\SyntaxTreeSemanticModel.cs (1)
1656return GetDeclarationName(declaration, methodDecl.Modifiers, methodDecl.ExplicitInterfaceSpecifier, methodDecl.Identifier.ValueText);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5700methodSyntax.Identifier,
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
31var nameToken = syntax.Identifier; 239var identifier = (typeDecl != null) ? typeDecl.Identifier : syntax.Identifier; 1062return this.FindExplicitlyImplementedMethod(isOperator: false, _explicitInterfaceType, syntax.Identifier.ValueText, syntax.ExplicitInterfaceSpecifier, diagnostics);
Syntax\LookupPosition.cs (1)
222var firstNameToken = explicitInterfaceSpecifier == null ? methodDecl.Identifier : explicitInterfaceSpecifier.GetFirstToken();
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
34return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.Identifier.GetLocation(); 60methodDeclaration.Identifier.ValueText != WellKnownMemberNames.EntryPointMethodName ||
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
196MethodDeclarationSyntax methodDeclaration => methodDeclaration.Identifier,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
55return ((MethodDeclarationSyntax)member).Identifier;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
55identifierToken = methodDeclaration.Identifier;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206EqualIdentifierName(x.Identifier, y.Identifier, out result);
Microsoft.CodeAnalysis.CSharp.Features (14)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
68_memberBuilder.Add(new CodeLensMember(node, node.Identifier.Span));
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
336MethodDeclarationSyntax method => [.. namedType.GetMembers(method.Identifier.ValueText).OfType<IMethodSymbol>()],
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
241identifier: otherMethod.Identifier,
EditAndContinue\SyntaxComparer.cs (1)
1459return ((MethodDeclarationSyntax)node).Identifier;
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
162MethodDeclarationSyntax member => (member, member.ExplicitInterfaceSpecifier, member.Identifier),
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
68MethodDeclarationSyntax methodDeclarationNode => methodDeclarationNode.Identifier,
Organizing\Organizers\MethodDeclarationOrganizer.cs (1)
34identifier: syntax.Identifier,
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
125var nameToken = GetPropertyName(getMethodDeclaration.Identifier, propertyName, nameChanged);
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (2)
195nameBuilder.Append(methodDeclaration.Identifier.ValueText); 215methodDeclaration.Identifier));
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
34return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.Identifier.GetLocation(); 60methodDeclaration.Identifier.ValueText != WellKnownMemberNames.EntryPointMethodName ||
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
196MethodDeclarationSyntax methodDeclaration => methodDeclaration.Identifier,
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
55identifierToken = methodDeclaration.Identifier;
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Classification\ClassificationHelpers.cs (1)
208else if (token.Parent is MethodDeclarationSyntax methodDeclaration && methodDeclaration.Identifier == token)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
2050MethodDeclarationSyntax methodDeclaration => methodDeclaration.Identifier.ValueText, 2077MethodDeclarationSyntax methodDeclaration => ReplaceWithTrivia(declaration, methodDeclaration.Identifier, id),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
349method.Identifier.ValueText, GetMethodSuffix(method), 356method.Identifier.Span,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
55return ((MethodDeclarationSyntax)member).Identifier;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206EqualIdentifierName(x.Identifier, y.Identifier, out result);
Microsoft.DotNet.GenFacades (3)
NotSupportedAssemblyGenerator.cs (3)
122if (node.Identifier.ValueText == "Dispose" || node.Identifier.ValueText == "Finalize") 215private string GetMethodDefinition(MethodDeclarationSyntax node) => GetFullyQualifiedName((TypeDeclarationSyntax)node.Parent) + "." + node.Identifier.ValueText;
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Parser.cs (5)
266Diag(DiagnosticDescriptors.LoggingMethodHasAllowsRefStructConstraint, method.Identifier.GetLocation()); 275Diag(DiagnosticDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 283Diag(DiagnosticDescriptors.InvalidLoggingMethodName, method.Identifier.GetLocation()); 342Diag(DiagnosticDescriptors.RedundantQualifierInMessage, ma.GetLocation(), method.Identifier.ToString());
Microsoft.Gen.Logging (6)
Parsing\Parser.cs (6)
218Diag(DiagDescriptors.LoggingMethodShouldBeStatic, method.Identifier.GetLocation()); 234Diag(DiagDescriptors.MissingLoggerMember, method.Identifier.GetLocation(), typeDec.Identifier.Text); 258Diag(DiagDescriptors.EmptyLoggingMethod, method.Identifier.GetLocation(), methodSymbol.Name); 390Diag(DiagDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 416Diag(DiagDescriptors.LoggingMethodMustBePartial, method.Identifier.GetLocation());
Microsoft.Interop.ComInterfaceGenerator (8)
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (4)
116return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 124return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 131return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 137return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.Identifier.GetLocation(), method.Name);
ComInterfaceGenerator.cs (1)
368syntax.Identifier,
ComMethodInfo.cs (2)
74return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); 80return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
VtableIndexStubGenerator.cs (1)
347var methodSyntaxTemplate = new ContainingSyntax(new SyntaxTokenList(syntax.Modifiers.Where(static m => !m.IsKind(SyntaxKind.PartialKeyword) && !m.IsKind(SyntaxKind.VirtualKeyword))).StripAccessibilityModifiers(), SyntaxKind.MethodDeclaration, syntax.Identifier, syntax.TypeParameterList);
Microsoft.Interop.JavaScript.JSImportGenerator (5)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (3)
166return DiagnosticInfo.Create(invalidSignatureDescriptor, methodSyntax.Identifier.GetLocation(), method.Name); 172return DiagnosticInfo.Create(containingTypeMissingModifiersDescriptor, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 178return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
JSExportGenerator.cs (1)
178var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList);
JSImportGenerator.cs (1)
161var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList);
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (3)
327return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 333return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 339return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
LibraryImportGenerator.cs (1)
268var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList);
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (3)
331return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 337return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 343return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
DownlevelLibraryImportGenerator.cs (1)
229var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList);
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)
108CheckPascal(node.Identifier, context);
QuarantineTools.Tests (8)
ActiveIssueTests.cs (3)
87var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M"); 240var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M"); 283var methodNodes = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == methodName).ToList();
QuarantineScriptTests.cs (5)
89var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M"); 141var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M"); 171var aM = methods.First(m => m.Identifier.ValueText == "M" && GetEnclosingNames(m).Namespace == "N1"); 172var bM = methods.First(m => m.Identifier.ValueText == "M" && GetEnclosingNames(m).Namespace == "N2"); 227var methodNodes = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == methodName).ToList();
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
55return ((MethodDeclarationSyntax)member).Identifier;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206EqualIdentifierName(x.Identifier, y.Identifier, out result);
SuperFileCheck (1)
Program.cs (1)
171var methodName = methodDecl.Identifier.ValueText;