105 references to Identifier
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)
469
position = methodDecl.
Identifier
.SpanStart;
Compilation\SyntaxTreeSemanticModel.cs (1)
1656
return GetDeclarationName(declaration, methodDecl.Modifiers, methodDecl.ExplicitInterfaceSpecifier, methodDecl.
Identifier
.ValueText);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Syntax.xml.Main.Generated.cs (1)
2090
=> 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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Syntax.xml.Syntax.Generated.cs (11)
12664
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)
12675
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);
12677
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);
12678
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);
12679
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);
12681
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);
12683
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);
12684
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);
12686
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);
12688
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);
12690
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);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5859
methodSyntax.
Identifier
,
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
31
var nameToken = syntax.
Identifier
;
239
var identifier = (typeDecl != null) ? typeDecl.Identifier : syntax.
Identifier
;
1087
return this.FindExplicitlyImplementedMethod(isOperator: false, _explicitInterfaceType, syntax.
Identifier
.ValueText, syntax.ExplicitInterfaceSpecifier, diagnostics);
Syntax\LookupPosition.cs (1)
222
var firstNameToken = explicitInterfaceSpecifier == null ? methodDecl.
Identifier
: explicitInterfaceSpecifier.GetFirstToken();
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
34
return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.
Identifier
.GetLocation();
60
methodDeclaration.
Identifier
.ValueText != WellKnownMemberNames.EntryPointMethodName ||
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
196
MethodDeclarationSyntax methodDeclaration => methodDeclaration.
Identifier
,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
55
return ((MethodDeclarationSyntax)member).
Identifier
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
55
identifierToken = methodDeclaration.
Identifier
;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206
EqualIdentifierName(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)
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)
195
nameBuilder.Append(methodDeclaration.
Identifier
.ValueText);
215
methodDeclaration.
Identifier
));
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
34
return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.
Identifier
.GetLocation();
60
methodDeclaration.
Identifier
.ValueText != WellKnownMemberNames.EntryPointMethodName ||
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
196
MethodDeclarationSyntax methodDeclaration => methodDeclaration.
Identifier
,
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
55
identifierToken = methodDeclaration.
Identifier
;
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Classification\ClassificationHelpers.cs (1)
208
else if (token.Parent is MethodDeclarationSyntax methodDeclaration && methodDeclaration.
Identifier
== token)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
2058
MethodDeclarationSyntax methodDeclaration => methodDeclaration.
Identifier
.ValueText,
2085
MethodDeclarationSyntax methodDeclaration => ReplaceWithTrivia(declaration, methodDeclaration.
Identifier
, id),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
349
method.
Identifier
.ValueText, GetMethodSuffix(method),
356
method.
Identifier
.Span,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
55
return ((MethodDeclarationSyntax)member).
Identifier
;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206
EqualIdentifierName(x.
Identifier
, y.
Identifier
, out result);
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)
266
Diag(DiagnosticDescriptors.LoggingMethodHasAllowsRefStructConstraint, method.
Identifier
.GetLocation());
275
Diag(DiagnosticDescriptors.MalformedFormatStrings, method.
Identifier
.GetLocation(), method.
Identifier
.ToString());
283
Diag(DiagnosticDescriptors.InvalidLoggingMethodName, method.
Identifier
.GetLocation());
342
Diag(DiagnosticDescriptors.RedundantQualifierInMessage, ma.GetLocation(), method.
Identifier
.ToString());
Microsoft.Gen.Logging (7)
Parsing\Parser.cs (7)
227
Diag(DiagDescriptors.LoggingMethodShouldBeStatic, method.
Identifier
.GetLocation());
243
Diag(DiagDescriptors.MissingLoggerMember, method.
Identifier
.GetLocation(), typeDec.Identifier.Text);
267
Diag(DiagDescriptors.EmptyLoggingMethod, method.
Identifier
.GetLocation(), methodSymbol.Name);
399
Diag(DiagDescriptors.MalformedFormatStrings, method.
Identifier
.GetLocation(), method.
Identifier
.ToString());
416
Diag(DiagDescriptors.LoggingMethodHasAllowsRefStructConstraint, method.
Identifier
.GetLocation());
436
Diag(DiagDescriptors.LoggingMethodMustBePartial, method.
Identifier
.GetLocation());
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (4)
116
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
124
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, typeDecl.Identifier);
131
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
137
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.
Identifier
.GetLocation(), method.Name);
ComMethodInfo.cs (2)
124
diagnostic = DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.
Identifier
.GetLocation(), method.Name);
131
diagnostic = DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (3)
166
return DiagnosticInfo.Create(invalidSignatureDescriptor, methodSyntax.
Identifier
.GetLocation(), method.Name);
172
return DiagnosticInfo.Create(containingTypeMissingModifiersDescriptor, methodSyntax.
Identifier
.GetLocation(), method.Name, nonPartialIdentifier);
178
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (4)
227
declaration.
Identifier
.GetLocation(),
366
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
372
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, nonPartialIdentifier);
378
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (4)
226
declaration.
Identifier
.GetLocation(),
367
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.
Identifier
.GetLocation(), method.Name);
373
return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.
Identifier
.GetLocation(), method.Name, nonPartialIdentifier);
379
return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.
Identifier
.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.SourceGeneration (4)
MethodSignatureDiagnosticLocations.cs (2)
57
: this(syntax.
Identifier
.Text, syntax.ParameterList.Parameters.Select(p => p.Identifier.GetLocation()).ToImmutableArray(), syntax.
Identifier
.GetLocation())
src\runtime\src\libraries\Common\src\SourceGenerators\ContainingTypeUtilities.cs (2)
45
declaration.
Identifier
.Text,
46
declaration.
Identifier
.Text + GetTypeParameters(declaration.TypeParameterList));
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
108
CheckPascal(node.
Identifier
, context);
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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
55
return ((MethodDeclarationSyntax)member).
Identifier
;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
206
EqualIdentifierName(x.
Identifier
, y.
Identifier
, out result);
SuperFileCheck (1)
Program.cs (1)
171
var methodName = methodDecl.
Identifier
.ValueText;
System.Text.Json.SourceGeneration (2)
src\runtime\src\libraries\Common\src\SourceGenerators\ContainingTypeUtilities.cs (2)
45
declaration.
Identifier
.Text,
46
declaration.
Identifier
.Text + GetTypeParameters(declaration.TypeParameterList));
System.Windows.Forms.Analyzers.CSharp (3)
System\Windows\Forms\CSharp\Analyzers\Designer\DesignerFileStructureAnalyzer.cs (2)
197
MethodDeclarationSyntax method => method.
Identifier
.ValueText,
206
MethodDeclarationSyntax method => method.
Identifier
.GetLocation(),
System\Windows\Forms\CSharp\Analyzers\Designer\InitializeComponentAnalyzer.cs (1)
54
|| method.
Identifier
.ValueText != "InitializeComponent"