2849 references to IdentifierNameSyntax
Microsoft.Analyzers.Extra (2)
Utilities\SyntaxNodeExtensions.cs (2)
128/// Checks <see cref="IdentifierNameSyntax"/> has expected name. 135return expression is IdentifierNameSyntax id && id.Identifier.Text == expectedName;
Microsoft.Analyzers.Extra.Tests (4)
SyntaxNodeExtensionsTests.cs (4)
117var node = SyntaxFactory.IdentifierName("expectedName"); 186var console = SyntaxFactory.IdentifierName("Console"); 187var writeline = SyntaxFactory.IdentifierName("WriteLine"); 197var b = SyntaxFactory.IdentifierName("b");
Microsoft.AspNetCore.App.Analyzers (5)
Kestrel\ListenOnIPv6AnyAnalyzer.cs (2)
34Name: IdentifierNameSyntax { Identifier.ValueText: "Listen" } 65Name: IdentifierNameSyntax { Identifier.ValueText: "Any" }
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (2)
97.OfType<IdentifierNameSyntax>() 101foreach (var reference in parameterReferences)
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
283.Where(node => node is IdentifierNameSyntax || node is GenericNameSyntax)
Microsoft.AspNetCore.App.CodeFixes (2)
Dependencies\AddPackageFixer.cs (1)
55var methodName = node is IdentifierNameSyntax identifier ? identifier.Identifier.Text : null;
WebApplicationBuilderFixer.cs (1)
84private static bool CanFixWebApplicationBuilder(Diagnostic diagnostic, IdentifierNameSyntax identifierMethod, SyntaxNode root, [NotNullWhen(true)] out InvocationExpressionSyntax? invocationName)
Microsoft.AspNetCore.Components.Analyzers (8)
ComponentParameterAnalyzer.cs (8)
168IdentifierNameSyntax? identifierUsedInGetter = GetIdentifierUsedInGetter(getterAccessor); 174IdentifierNameSyntax? identifierUsedInSetter = GetIdentifierUsedInSetter(setterAccessor); 181private static IdentifierNameSyntax? GetIdentifierUsedInGetter(AccessorDeclarationSyntax getter) 185return returnStatement.Expression as IdentifierNameSyntax; 188return getter.ExpressionBody?.Expression as IdentifierNameSyntax; 191private static IdentifierNameSyntax? GetIdentifierUsedInSetter(AccessorDeclarationSyntax setter) 206if (assignmentExpression is not null && assignmentExpression.Right is IdentifierNameSyntax right && 209return assignmentExpression.Left as IdentifierNameSyntax;
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
StaticRouteHandlerModel\Endpoint.cs (2)
175var name = (IdentifierNameSyntax)expression.Name;
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
20Name: IdentifierNameSyntax
HubServerProxyGenerator.Parser.cs (1)
20Name: IdentifierNameSyntax
Microsoft.CodeAnalysis.CSharp (96)
Binder\Binder.CapturedParametersFinder.cs (2)
141protected override bool IsIdentifierOfInterest(IdentifierNameSyntax id) 146protected override bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id, LookupResult lookupResult)
Binder\Binder.IdentifierUsedAsValueFinder.cs (5)
49case IdentifierNameSyntax id: 169protected abstract bool IsIdentifierOfInterest(IdentifierNameSyntax id); 194private bool CheckIdentifier(Binder enclosingBinder, IdentifierNameSyntax id) 205protected abstract bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id, LookupResult lookupResult); 209IdentifierNameSyntax id,
Binder\Binder_Attributes.cs (1)
517IdentifierNameSyntax nameSyntax = namedArgument.NameEquals.Name;
Binder\Binder_Expressions.cs (20)
1025IdentifierNameSyntax nameSyntax = argumentSyntax.NameColon?.Name; 1090IdentifierNameSyntax nameSyntax = argumentSyntax.NameColon?.Name; 1657if (node is IdentifierNameSyntax identifier) 1702if (node is IdentifierNameSyntax id && !this.IsSemanticModelBinder) 1814private static bool FallBackOnDiscard(IdentifierNameSyntax node, BindingDiagnosticBag diagnostics) 2374return this.BindNamespaceAlias((IdentifierNameSyntax)node, diagnostics); 2391var name = node as IdentifierNameSyntax; 2423public BoundExpression BindNamespaceAlias(IdentifierNameSyntax node, BindingDiagnosticBag diagnostics) 5714var identifierName = (IdentifierNameSyntax)memberInitializer; 5786var memberName = (IdentifierNameSyntax)leftSyntax; 6023var identName = memberNameSyntax as IdentifierNameSyntax; 6068var memberNameSyntax = namedAssignment.Left as IdentifierNameSyntax; 7420if (left is IdentifierNameSyntax identifier) 7431private BoundExpression BindLeftIdentifierOfPotentialColorColorMemberAccess(IdentifierNameSyntax left, BindingDiagnosticBag diagnostics) 7504private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type)
Binder\Binder_Invocation.cs (2)
2272var syntax = (IdentifierNameSyntax)argument;
Binder\Binder_Lambda.cs (1)
286if (syntax is IdentifierNameSyntax { Identifier.RawContextualKind: (int)SyntaxKind.VarKeyword })
Binder\Binder_Operators.cs (2)
484&& ((IdentifierNameSyntax)parenthesizedExpression.Expression).Identifier.ValueText == "dynamic") 3220node is IdentifierNameSyntax name && name.Identifier.IsUnderscoreToken();
Binder\Binder_Patterns.cs (3)
1516case IdentifierNameSyntax name: 1519case MemberAccessExpressionSyntax { Name: IdentifierNameSyntax name } memberAccess when memberAccess.IsKind(SyntaxKind.SimpleMemberAccessExpression): 1541IdentifierNameSyntax memberName,
Binder\Binder_Query.cs (4)
180var name = select.Expression as IdentifierNameSyntax; 256var vId = v as IdentifierNameSyntax;
Binder\Binder_Symbols.cs (13)
111var symbol = BindTypeOrAliasOrKeyword((IdentifierNameSyntax)syntax, diagnostics, out isVar); 151var identifierSyntax = (IdentifierNameSyntax)syntax; 187private NamespaceOrTypeOrAliasSymbolWithAnnotations BindTypeOrAliasOrKeyword(IdentifierNameSyntax syntax, BindingDiagnosticBag diagnostics, out bool isKeyword) 189return BindTypeOrAliasOrKeyword(((IdentifierNameSyntax)syntax).Identifier, syntax, diagnostics, out isKeyword); 353internal Symbol BindNamespaceAliasSymbol(IdentifierNameSyntax node, BindingDiagnosticBag diagnostics) 419return BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol((IdentifierNameSyntax)syntax, diagnostics, basesBeingResolved, suppressUseSiteDiagnostics, qualifierOpt: null); 837return BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol((IdentifierNameSyntax)syntax, diagnostics, basesBeingResolved, suppressUseSiteDiagnostics, qualifierOpt); 845IdentifierNameSyntax node, 991private NamedTypeSymbol BindNativeIntegerSymbolIfAny(IdentifierNameSyntax node, BindingDiagnosticBag diagnostics) 1017(invocation.Expression as IdentifierNameSyntax)?.Identifier.ContextualKind() == SyntaxKind.NameOfKeyword): 1026private void ReportUseSiteDiagnosticForDynamic(BindingDiagnosticBag diagnostics, IdentifierNameSyntax node) 2610if ((where as IdentifierNameSyntax)?.Identifier.Text == "var" && !options.IsAttributeTypeLookup())
Binder\InMethodBinder.cs (1)
37public ConcurrentDictionary<IdentifierNameSyntax, int> IdentifierMap;
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
42public void AddName(IdentifierNameSyntax name)
Binder\WithCrefTypeParametersBinder.cs (2)
126IdentifierNameSyntax typeParameterSyntax = (IdentifierNameSyntax)typeArguments[i];
Compilation\CSharpSemanticModel.cs (8)
530return this.GetNamedArgumentSymbolInfo((IdentifierNameSyntax)expression, cancellationToken); 1168public IAliasSymbol GetAliasInfo(IdentifierNameSyntax nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1195public IAliasSymbol GetSpeculativeAliasInfo(int position, IdentifierNameSyntax nameSyntax, SpeculativeBindingOption bindingOption) 4473private SymbolInfo GetNamedArgumentSymbolInfo(IdentifierNameSyntax identifierNameSyntax, CancellationToken cancellationToken) 4848public PreprocessingSymbolInfo GetPreprocessingSymbolInfo(IdentifierNameSyntax node) 5049return nameSyntax is IdentifierNameSyntax identifier 5066return node is IdentifierNameSyntax nameSyntax ? GetAliasInfo(nameSyntax, cancellationToken) : null; 5071return node is IdentifierNameSyntax nameSyntax
Compilation\SyntaxTreeSemanticModel.cs (1)
347return binder.BindNamespaceAliasSymbol(node as IdentifierNameSyntax, BindingDiagnosticBag.Discarded);
Compiler\DocumentationCommentCompiler.cs (1)
1153IdentifierNameSyntax identifier = syntax.Identifier;
Compiler\MethodCompiler.cs (9)
1783ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap; 1979out InMethodBinder? inMethodBinder, out ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap) 1997identifierMap = new ConcurrentDictionary<IdentifierNameSyntax, int>(ReferenceEqualityComparer.Instance); 2032static void addIdentifiers(CSharpSyntaxNode? node, ConcurrentDictionary<IdentifierNameSyntax, int> identifierMap) 2066).OfType<IdentifierNameSyntax>().Where( 2113static void assertBindIdentifierTargets(InMethodBinder? inMethodBinder, ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap, BoundNode methodBody, BindingDiagnosticBag diagnostics) 2197private readonly IdentifierNameSyntax _id; 2199private UnboundLambdaFinder(IdentifierNameSyntax id) 2204public static bool FoundInUnboundLambda(BoundNode methodBody, IdentifierNameSyntax id)
CSharpExtensions.cs (2)
1028public static IAliasSymbol? GetAliasInfo(this SemanticModel? semanticModel, IdentifierNameSyntax nameSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1038public static IAliasSymbol? GetSpeculativeAliasInfo(this SemanticModel? semanticModel, int position, IdentifierNameSyntax nameSyntax, SpeculativeBindingOption bindingOption)
Lowering\LocalRewriter\LocalRewriter.cs (2)
249var nameofIdentiferSyntax = (IdentifierNameSyntax)((InvocationExpressionSyntax)nameofOperator.Syntax).Expression;
Parser\LanguageParser.cs (1)
5707if (!SyntaxFacts.IsContextualKeyword(((CSharp.Syntax.IdentifierNameSyntax)this.CurrentNode).Identifier.Kind()))
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (3)
254var identifierName = SyntaxFactory.IdentifierName(symbol.Name); 259var identifier = token.Parent as IdentifierNameSyntax;
Symbols\Source\CrefTypeParameterSymbol.cs (1)
71public CrefTypeParameterSymbol(string name, int ordinal, IdentifierNameSyntax declaringSyntax)
Syntax\CSharpPragmaWarningStateMap.cs (1)
132errorId = ((IdentifierNameSyntax)currentErrorCode).Identifier.ValueText;
Syntax\CSharpSyntaxNode.cs (1)
553&& node is not IdentifierNameSyntax)
Syntax\LambdaUtilities.cs (1)
223var selectorIdentifier = ((IdentifierNameSyntax)selectOrGroupExpression).Identifier;
Syntax\NameColonSyntax.cs (2)
15if (expression is IdentifierNameSyntax identifierName) 26public static NameColonSyntax NameColon(IdentifierNameSyntax name)
Syntax\SyntaxExtensions.cs (2)
192? (SimpleNameSyntax)((IdentifierNameSyntax)simpleName).WithIdentifier(identifier) 196internal static bool IsTypeInContextWhichNeedsDynamicAttribute(this IdentifierNameSyntax typeNode)
Syntax\SyntaxFactory.cs (1)
1537public static IdentifierNameSyntax IdentifierName(string name)
Syntax\SyntaxNodeExtensions.cs (3)
56((IdentifierNameSyntax)node.Expression).Identifier.ContextualKind() == SyntaxKind.NameOfKeyword && 201return ((IdentifierNameSyntax)input).Identifier; 359((IdentifierNameSyntax)invocationTarget).IsVar;
Microsoft.CodeAnalysis.CSharp.CodeStyle (75)
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
90if (argumentExpression is not IdentifierNameSyntax identifierName) 387if (descendentNode is IdentifierNameSyntax identifierName)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (8)
153if (invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression && 239var invocationName = invocationExpression.Expression switch 241IdentifierNameSyntax identifier => identifier, 244Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) }, 245Expression: IdentifierNameSyntax identifier 253var conditionName = condition.Left is IdentifierNameSyntax leftIdentifier 255: (IdentifierNameSyntax)condition.Right;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
66if (typeSyntax is IdentifierNameSyntax identifierName &&
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
103if (argument.Expression is not IdentifierNameSyntax argumentIdentifier)
src\Analyzers\CSharp\Analyzers\RemoveUnusedMembers\CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
20IdentifierNameSyntax,
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (4)
74Left: IdentifierNameSyntax leftIdentifier, 113Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Enumerable.Where) }, 155Expression: IdentifierNameSyntax castIdentifier, 161Name: IdentifierNameSyntax
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
28IdentifierNameSyntax> 235Right: IdentifierNameSyntax { Identifier.ValueText: "value" } 268if (descendant is IdentifierNameSyntax identifierName)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (2)
214foreach (var identifierName in statement.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>())
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (8)
104if (topMostExpression.Parent is CastExpressionSyntax castExpression && castExpression.Type is IdentifierNameSyntax) 552foreach (var identifier in containingBlock.DescendantNodes().OfType<IdentifierNameSyntax>()) 809Expression: IdentifierNameSyntax { Identifier.ValueText: var elementName }, 831if (assignmentExpression.Right.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Any( 1106if (memberAccess.Name is not IdentifierNameSyntax { Identifier.ValueText: EmptyName }) 1171if (name is IdentifierNameSyntax) 1174if (name is MemberAccessExpressionSyntax { Expression: ExpressionSyntax childName, Name: IdentifierNameSyntax } &&
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
252foreach (var identifierName in searchScope.DescendantNodes().OfType<IdentifierNameSyntax>())
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
255if (descendentNode is IdentifierNameSyntax identifierName) 373var identifierName = (IdentifierNameSyntax)assignment.Left;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
374if (descendentNode is IdentifierNameSyntax identifierName &&
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (7)
178if (descendentNode is IdentifierNameSyntax identifierName) 216if (descendentNode is IdentifierNameSyntax identifierName && ! 237if (descendentNode is IdentifierNameSyntax identifierName && 281var identifier = (IdentifierNameSyntax)operand; 298assignment.Left is not IdentifierNameSyntax identifier) 318IdentifierNameSyntax identifier,
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (4)
479var leftIdentifier = assignmentExpression.Left switch 481IdentifierNameSyntax identifierName => identifierName, 482MemberAccessExpressionSyntax(kind: SyntaxKind.SimpleMemberAccessExpression) { Expression: (kind: SyntaxKind.ThisExpression), Name: IdentifierNameSyntax identifierName } => identifierName, 512operation is IParameterReferenceOperation { Syntax: IdentifierNameSyntax parameterName } parameterReference)
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
101if (secondAssignmentExprTemp is not IdentifierNameSyntax { Identifier: var secondAssignmentExprTempIdentifier })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (3)
422=> expression is IdentifierNameSyntax { Parent: NameColonSyntax }; 428if (invocation?.Expression is IdentifierNameSyntax name && 655return invocation.Expression is IdentifierNameSyntax identifierName &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (3)
89var nx = (IdentifierNameSyntax)expression; 364if (current is IdentifierNameSyntax identifierName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (2)
19return typeSyntax is IdentifierNameSyntax && 20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
354if (errorCode is not IdentifierNameSyntax identifierName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (3)
340case IdentifierNameSyntax { Parent: PrimaryConstructorBaseTypeSyntax baseType }: 350if (node is IdentifierNameSyntax { IsVar: true }) 401IdentifierNameSyntax nameSyntax when IsInPreprocessingSymbolContext(nameSyntax) => CreatePreprocessingSymbol(semanticModel, nameSyntax.Identifier),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (4)
629=> (node as IdentifierNameSyntax).IsAttributeNamedArgumentIdentifier(); 654if (node is IdentifierNameSyntax identifier && 829var identifier = ((IdentifierNameSyntax)node).Identifier; 1576=> node is AssignmentExpressionSyntax(SyntaxKind.SimpleAssignmentExpression) { Left: IdentifierNameSyntax };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (5)
40(IdentifierNameSyntax identifierX, IdentifierNameSyntax identifierY) => _tokenComparer.Compare(identifierX.Identifier, identifierY.Identifier), 42(IdentifierNameSyntax identifierX, GenericNameSyntax genericY) => 46(GenericNameSyntax genericX, IdentifierNameSyntax identifierY) => 97result.Add((IdentifierNameSyntax)name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (4)
255var originalIdentifierNodes = originalLambdaBody.DescendantNodes().OfType<IdentifierNameSyntax>().Where(node => paramNames.Contains(node.Identifier.ValueText)); 261var replacedIdentifierNodes = replacedLambdaBody.DescendantNodes().OfType<IdentifierNameSyntax>().Where(node => paramNames.Contains(node.Identifier.ValueText)); 273IEnumerable<IdentifierNameSyntax> originalIdentifierNodes, 274IEnumerable<IdentifierNameSyntax> replacedIdentifierNodes,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
103var candidateReplacementNode = SyntaxFactory.IdentifierName("var"); 281.Where(n => n is IdentifierNameSyntax id && id.Identifier.ValueText.Equals(identifier.ValueText))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (50)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
106Contract.ThrowIfFalse(_assignmentTarget is IdentifierNameSyntax); 117identifier: ((IdentifierNameSyntax)_assignmentTarget).Identifier,
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (3)
72if (left is not IdentifierNameSyntax and not MemberAccessExpressionSyntax) 127: (IdentifierNameSyntax)left; 147var newNameNode = matchingMember.Name.ToIdentifierName();
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
44if (constraint.Type is not IdentifierNameSyntax { Identifier.IsMissing: true } type)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
23=> node is IdentifierNameSyntax;
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
39=> node is IdentifierNameSyntax;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
118if (type is IdentifierNameSyntax)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (6)
78private static (VariableDeclaratorSyntax declarator, IdentifierNameSyntax identifier, SyntaxNode invocationOrCreation) FindDiagnosticNodes( 87var identifier = (IdentifierNameSyntax)identifierLocation.FindNode(cancellationToken); 98IdentifierNameSyntax identifier, SyntaxNode currentNode, 281SourceText sourceText, IdentifierNameSyntax identifier, 339IdentifierNameSyntax identifier,
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
88invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression 131invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (2)
67if (referenceNode is not IdentifierNameSyntax identifierNode) 137if (referenceNode is IdentifierNameSyntax identifierNode)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
223if (argument.NameColon?.Name is IdentifierNameSyntax { Identifier: var identifier })
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
50var identifierName = (IdentifierNameSyntax)node; 125newNameNode is IdentifierNameSyntax { Identifier.ValueText: AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName } &&
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseImplicitTypeCodeFixProvider.cs (1)
50var implicitType = SyntaxFactory.IdentifierName("var")
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
105if (invocation.Expression is IdentifierNameSyntax)
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndMemberAccessCodeFixProvider.cs (1)
98if (whenNotNull is MemberBindingExpressionSyntax { Name: IdentifierNameSyntax identifierName })
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
585if (location.Location.FindNode(findInsideTrivia: true, getInnermostNodeForTie: true, cancellationToken) is not IdentifierNameSyntax identifier)
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
137if (reference.Location.FindNode(cancellationToken) is not IdentifierNameSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
306var name = IdentifierName(names[i]); 309result = AliasQualifiedName((IdentifierNameSyntax)result, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
698=> token.Parent is IdentifierNameSyntax typedParent &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (7)
1112else if (token.IsKind(SyntaxKind.IdentifierToken) && token.Text == "scoped" && token.Parent is IdentifierNameSyntax scopedIdentifierName) 1269else if (token.IsKind(SyntaxKind.IdentifierToken) && token.Text == "scoped" && token.Parent is IdentifierNameSyntax scopedIdentifierName && scopedIdentifierName.Parent.IsKind(SyntaxKind.Parameter)) 1506if (patternSyntax is ConstantPatternSyntax { Expression: CastExpressionSyntax { Expression: IdentifierNameSyntax } castExpression } && 1655@foreach.Type is IdentifierNameSyntax identifierName && 1695if (invocation.Expression is IdentifierNameSyntax identifierName && 2151gotoStatement.Expression is IdentifierNameSyntax && 2152((IdentifierNameSyntax)gotoStatement.Expression).Identifier == token &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (1)
87var syntax = AddInformationTo(symbol.Name.ToIdentifierName(), symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (3)
112var typeSyntax = IdentifierName("dynamic"); 221private static IdentifierNameSyntax CreateGlobalIdentifier() 320var syntax = AddInformationTo(symbol.Name.ToIdentifierName(), symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
31return ((IdentifierNameSyntax)nameSyntax).Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
57public static IdentifierNameSyntax ToIdentifierName(this string identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
84var replacementNode = IdentifierName(discardToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
1823if (node is IdentifierNameSyntax identifierName) 2214foreach (var descendant in container.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>()) 2314else if (expr is IdentifierNameSyntax name)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
121if (node is IdentifierNameSyntax { Parent: not NameColonSyntax } identifierName &&
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (136)
CodeGen\CodeGenAsyncIteratorTests.cs (4)
8747var s = GetSyntax<IdentifierNameSyntax>(tree, "s"); 8813var s = GetSyntax<IdentifierNameSyntax>(tree, "s");
CodeGen\CodeGenDeconstructTests.cs (101)
3141var x1Ref = GetReference(tree, "x1"); 3145var x2Ref = GetReference(tree, "x2"); 3149var x3Ref = GetReference(tree, "x3"); 3195var x1Ref = GetReference(tree, "x1"); 3199var x2Ref = GetReference(tree, "x2"); 3203var x3Ref = GetReference(tree, "x3"); 3207var x4Ref = GetReference(tree, "x4"); 3211var x5Ref = GetReference(tree, "x5"); 3293var x1Ref = GetReference(tree, "x1"); 3297var x2Ref = GetReference(tree, "x2"); 3301var x3Ref = GetReference(tree, "x3"); 3369var x1Ref = GetReference(tree, "x1"); 3373var x2Ref = GetReference(tree, "x2"); 3377var x3Ref = GetReference(tree, "x3"); 3545var x1Ref = GetReference(tree, "x1"); 3549var x2Ref = GetReference(tree, "x2"); 3553var x3Ref = GetReference(tree, "x3"); 3562private static void VerifyModelForDeconstructionLocal(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 3567private static void VerifyModelForLocal(SemanticModel model, SingleVariableDesignationSyntax decl, LocalDeclarationKind kind, params IdentifierNameSyntax[] references) 3572private static void VerifyModelForDeconstructionForeach(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 3577private static void VerifyModelForDeconstruction(SemanticModel model, SingleVariableDesignationSyntax decl, LocalDeclarationKind kind, params IdentifierNameSyntax[] references) 3600foreach (var reference in references) 3609private static void VerifyModelForDeconstructionField(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 3619foreach (var reference in references) 3643private static IEnumerable<IdentifierNameSyntax> GetDiscardIdentifiers(SyntaxTree tree) 3645return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken); 3648private static IdentifierNameSyntax GetReference(SyntaxTree tree, string name) 3653private static IdentifierNameSyntax[] GetReferences(SyntaxTree tree, string name, int count) 3660private static IEnumerable<IdentifierNameSyntax> GetReferences(SyntaxTree tree, string name) 3662return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name); 3691var x1Ref = GetReference(tree, "x1"); 3695var x2Ref = GetReference(tree, "x2"); 3736var x1Ref = GetReference(tree, "x1"); 3740var x2Ref = GetReference(tree, "x2"); 3744var x3Ref = GetReference(tree, "x3"); 3748var x4Ref = GetReference(tree, "x4"); 3793var x1Ref = GetReference(tree, "x1"); 3797var x2Ref = GetReference(tree, "x2"); 3889var x1Ref = GetReference(tree, "x1"); 3893var x2Ref = GetReference(tree, "x2"); 3937var x2Ref = GetReference(tree, "x2"); 3983var x2Ref = GetReference(tree, "x2"); 4028var x1Ref = GetReference(tree, "x1"); 4032var x2Ref = GetReference(tree, "x2"); 4134var x1Ref = GetReference(tree, "x1"); 4140var x2Ref = GetReference(tree, "x2"); 4219var x1Ref = GetReference(tree, "x1"); 4223var x2Ref = GetReference(tree, "x2"); 4330var x1Ref = GetReference(tree, "x1"); 4334var x2Ref = GetReference(tree, "x2"); 4439var x1Ref = GetReference(tree, "x1"); 4443var x2Ref = GetReference(tree, "x2"); 4447var x3Ref = GetReference(tree, "x3"); 4451var x4Ref = GetReference(tree, "x4"); 4455var x5Ref = GetReference(tree, "x5"); 4593var x1Ref = GetReference(tree, "x1"); 4597var x2Ref = GetReference(tree, "x2"); 4601var x3Ref = GetReference(tree, "x3"); 5023var xRef = GetReference(tree, "x"); 5029var yRef = GetReference(tree, "y"); 5175var x1Ref = GetReference(tree, "x1"); 5181var x2Ref = GetReference(tree, "x2"); 5566var xRef = GetReference(tree, "x"); 5645var x1Ref = GetReference(tree, "x1"); 5654var x2Ref = GetReference(tree, "x2"); 5689var x1Ref = GetReference(tree, "x1"); 5698var x2Ref = GetReference(tree, "x2"); 5728var x1Ref = GetReference(tree, "x1"); 5734var x3Ref = GetReference(tree, "x3"); 5770var x1Ref = GetReference(tree, "x1"); 5776var x3Ref = GetReference(tree, "x3"); 5806var x1Ref = GetReference(tree, "x1"); 5812var x3Ref = GetReference(tree, "x3"); 5856var x1Ref = GetReference(tree, "x1"); 5863var x3Ref = GetReference(tree, "x3"); 5999var discard = GetDiscardIdentifiers(tree).First(); 6036foreach (var discard in discards) 6089foreach (var discard in discards) 6137foreach (var discard in discards) 6254var discard = GetDiscardIdentifiers(tree).First(); 6305var discard1 = GetDiscardIdentifiers(tree).First(); 6367var discard = GetDiscardIdentifiers(tree).First(); 6403IdentifierNameSyntax discard2 = GetDiscardIdentifiers(tree).First(); 6562var discard1 = GetDiscardIdentifiers(tree).First(); 6993var discard3 = GetDiscardIdentifiers(tree).First(); 7067var discard = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(); 7124var x1Ref = GetReference(tree, "x1"); 7128var x2Ref = GetReference(tree, "x2"); 7177var x1Ref = GetReference(tree, "x1"); 7232var x1Ref = GetReference(tree, "x1"); 7270var x1Ref = GetReference(tree, "x1"); 7307var x1Ref = GetReference(tree, "x1"); 7314var x2Ref = GetReference(tree, "x2"); 7355var x1Ref = GetReference(tree, "x1"); 7360var x2Ref = GetReference(tree, "x2"); 7394var x1Ref = GetReference(tree, "x1"); 7507var xRef = GetReference(tree, "x"); 7514var zRef = GetReference(tree, "z"); 7564var x1Ref = GetReference(tree, "x1"); 7568var x2Ref = GetReference(tree, "x2");
CodeGen\CodeGenExprLambdaTests.cs (4)
1849var s = GetSyntax<IdentifierNameSyntax>(tree, "a"); 1886var s = GetSyntax<IdentifierNameSyntax>(tree, "a");
CodeGen\CodeGenTupleTest.cs (27)
13974var nameofNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "nameof").Single(); 14245var m1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M1").Single(); 14261var m2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M2").Single(); 14275var f1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F1").First(); 14289var p1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "P1").First(); 14306var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M3").Single(); 14324var m4 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M4").Single(); 14331var m5 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M5").Single(); 14338var m6 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M6").Single(); 14433var e1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "E1").Single(); 14447var m5 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M5").Single(); 14454var v1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "v1").Single(); 14464var v2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "v2").Single(); 24180var nodes = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "elem2").ToArray();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1204)
Attributes\AttributeTests_WellKnownAttributes.cs (2)
9655var syntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(n => n.Identifier.ValueText == "OnBehaviorAttached");
Diagnostics\DiagnosticAnalyzerTests.cs (2)
55var id = (IdentifierNameSyntax)context.Node;
FieldKeywordTests.cs (2)
1278Assert.IsType<IdentifierNameSyntax>(argument); 1282Assert.IsType<IdentifierNameSyntax>(argument);
Semantics\CollectionExpressionTests.cs (4)
42043var expr = nodes.OfType<IdentifierNameSyntax>().Last(); 42098var expr = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 42145var expr = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 42197var expr = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last();
Semantics\InlineArrayTests.cs (21)
2359var c = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "c").Single(); 2394var c = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "c").Single(); 2428var c = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "c").Single(); 2508var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").First(); 6033var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").First(); 6199var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").Last(); 8835var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "M3").Single().Parent; 9203var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "M3").Single(); 10547var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").Last(); 11291var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").Last(); 15208var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").ToArray(); 16495var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "M3").First().Parent;
Semantics\OutVarTests.cs (567)
60var x1Ref = GetReference(tree, "x1"); 220var x1Ref = GetReference(tree, "x1"); 224var x2Ref = GetReference(tree, "x2"); 273var x1Ref = GetReference(tree, "x1"); 277var x2Ref = GetReference(tree, "x2"); 336var x1Ref = GetReference(tree, "x1"); 340var x2Ref = GetReference(tree, "x2"); 344var x3Ref = GetReference(tree, "x3"); 819private static IdentifierNameSyntax GetReference(SyntaxTree tree, string name) 824private static IdentifierNameSyntax[] GetReferences(SyntaxTree tree, string name, int count) 831internal static IEnumerable<IdentifierNameSyntax> GetReferences(SyntaxTree tree, string name) 833return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name); 863private static IEnumerable<IdentifierNameSyntax> GetDiscardIdentifiers(SyntaxTree tree) 865return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken); 911var x1Ref = GetReference(tree, "x1"); 914var x2Ref = GetReference(tree, "x2"); 919private static void VerifyModelForOutVarWithoutDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 924private static void VerifyModelForOutVarWithoutDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, bool isShadowed, params IdentifierNameSyntax[] references) 929private static void VerifyModelForDeclarationVarWithoutDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 934internal static void VerifyModelForOutVar(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 939private static void VerifyModelForOutVarInNotExecutableCode(SemanticModel model, DeclarationExpressionSyntax decl, params IdentifierNameSyntax[] references) 947IdentifierNameSyntax reference) 962params IdentifierNameSyntax[] references) 989foreach (var reference in references) 1088private static void VerifyDataFlow(SemanticModel model, DeclarationExpressionSyntax decl, bool isDelegateCreation, bool isExecutableCode, IdentifierNameSyntax[] references, ISymbol symbol) 1153private static void VerifyNotInScope(SemanticModel model, IdentifierNameSyntax reference) 1160private static void VerifyNotAnOutField(SemanticModel model, IdentifierNameSyntax reference) 1170internal static void VerifyNotAnOutLocal(SemanticModel model, IdentifierNameSyntax reference) 1206private static bool FlowsIn(ExpressionSyntax dataFlowParent, DeclarationExpressionSyntax decl, IdentifierNameSyntax[] references) 1208foreach (var reference in references) 1222private static bool IsRead(IdentifierNameSyntax reference) 1257private static bool ReadOutside(ExpressionSyntax dataFlowParent, IdentifierNameSyntax[] references) 1259foreach (var reference in references) 1273private static bool FlowsOut(ExpressionSyntax dataFlowParent, DeclarationExpressionSyntax decl, IdentifierNameSyntax[] references) 1296foreach (var reference in references) 1315private static bool WrittenOutside(ExpressionSyntax dataFlowParent, IdentifierNameSyntax[] references) 1317foreach (var reference in references) 1331private static bool IsWrite(IdentifierNameSyntax reference) 1408var x1Ref = GetReference(tree, "x1"); 1411var x2Ref = GetReference(tree, "x2"); 1466var x1Ref = GetReference(tree, "x1"); 1500var x1Ref = GetReference(tree, "x1"); 1643var x1Ref = GetReference(tree, "x1"); 1646var x2Ref = GetReference(tree, "x2"); 1681var x1Ref = GetReference(tree, "x1"); 1718var x1Ref = GetReference(tree, "x1"); 1754var x1Ref = GetReference(tree, "x1"); 2008var x3Ref = GetReference(tree, "x3"); 2012var x4Ref = GetReference(tree, "x4"); 2016var x5Ref = GetReference(tree, "x5"); 2118var x3Ref = GetReference(tree, "x3"); 2122var x4Ref = GetReference(tree, "x4"); 2126var x5Ref = GetReference(tree, "x5"); 2229var x3Ref = GetReference(tree, "x3"); 2233var x4Ref = GetReference(tree, "x4"); 2237var x5Ref = GetReference(tree, "x5"); 2339var x3Ref = GetReference(tree, "x3"); 2343var x4Ref = GetReference(tree, "x4"); 2347var x5Ref = GetReference(tree, "x5"); 3205var x3Ref = GetReferences(tree, "x3").Single(); 3209var x4Ref = GetReferences(tree, "x4").Single(); 3213var x5Ref = GetReferences(tree, "x5").Single(); 3307var x3Ref = GetReferences(tree, "x3").Single(); 3311var x4Ref = GetReferences(tree, "x4").Single(); 3315var x5Ref = GetReferences(tree, "x5").Single(); 3470var x1Ref = GetReference(tree, "x1"); 3511var x1Ref = GetReference(tree, "x1"); 3650var x4Ref = GetReferences(tree, "x4").Single(); 3655var x5Ref = GetReferences(tree, "x5").Single(); 3661var x6Ref = GetReferences(tree, "x6").Single(); 3665var x7Ref = GetReferences(tree, "x7").Single(); 3669var x8Ref = GetReferences(tree, "x8").Single(); 3673var x9Ref = GetReferences(tree, "x9").Single(); 3912var y12Ref = GetReferences(tree, "y12").Single(); 3965var x1Ref = GetReferences(tree, "x1").Single(); 4277var x3Ref = GetReferences(tree, "x3").Single(); 4281var x4Ref = GetReferences(tree, "x4").Single(); 4285var x5Ref = GetReferences(tree, "x5").Single(); 4305var x11Ref = GetReferences(tree, "x11").Single(); 4502var x3Ref = GetReferences(tree, "x3").Single(); 4507var x4Ref = GetReferences(tree, "x4").Single(); 4511var x5Ref = GetReferences(tree, "x5").Single(); 4543var x13Ref = GetReferences(tree, "x13").Single(); 4679var x3Ref = GetReferences(tree, "x3").Single(); 4683var x4Ref = GetReferences(tree, "x4").Single(); 4687var x5Ref = GetReferences(tree, "x5").Single(); 4707var x11Ref = GetReferences(tree, "x11").Single(); 4928var x2Ref = GetReferences(tree, "x2").Single(); 4932var x3Ref = GetReferences(tree, "x3").Single(); 4958var x9Ref = GetReferences(tree, "x9").Single(); 4962var x10Ref = GetReferences(tree, "x10").Single(); 5184var x3Ref = GetReferences(tree, "x3").Single(); 5188var x4Ref = GetReferences(tree, "x4").Single(); 5192var x5Ref = GetReferences(tree, "x5").Single(); 5212var x8Ref = GetReference(tree, "x8"); 5217var x9Ref = GetReference(tree, "x9"); 5287var x3Ref = GetReferences(tree, "x3").Single(); 5291var x4Ref = GetReferences(tree, "x4").Single(); 5295var x5Ref = GetReferences(tree, "x5").Single(); 5414var x3Ref = GetReferences(tree, "x3").Single(); 5418var x4Ref = GetReferences(tree, "x4").Single(); 5422var x5Ref = GetReferences(tree, "x5").Single(); 5516var x3Ref = GetReferences(tree, "x3").Single(); 5520var x4Ref = GetReferences(tree, "x4").Single(); 5533var x6Ref = GetReferences(tree, "x6").Single(); 5580var x1Ref = GetReferences(tree, "x1").Single(); 5712var x1Ref = GetReferences(tree, "x1").Single(); 5957var y12Ref = GetReferences(tree, "y12").Single(); 6375var y12Ref = GetReferences(tree, "y12").Single(); 6610var y12Ref = GetReferences(tree, "y12").Single(); 6873var y12Ref = GetReferences(tree, "y12").Single(); 7112var y12Ref = GetReferences(tree, "y12").Single(); 7350var y12Ref = GetReferences(tree, "y12").Single(); 7628var x1Ref = GetReferences(tree, "x1").Single(); 7633var x2Ref = GetReferences(tree, "x2").Single(); 7637var x3Ref = GetReferences(tree, "x3").Single(); 7641var x4Ref = GetReferences(tree, "x4").Single(); 7646var x5Ref = GetReferences(tree, "x5").Single(); 7650var x6Ref = GetReferences(tree, "x6").Single(); 7654var x7Ref = GetReferences(tree, "x7").Single(); 8435var y12Ref = GetReferences(tree, "y12").Single(); 8686var x5Ref = GetReferences(tree, "x5").Single(); 8717var y12Ref = GetReferences(tree, "y12").Single(); 8765var x1Ref = GetReferences(tree, "x1").Single(); 9165var x3Ref = GetReferences(tree, "x3").Single(); 9169var x4Ref = GetReferences(tree, "x4").Single(); 9173var x5Ref = GetReferences(tree, "x5").Single(); 9267var x1Ref = GetReferences(tree, "x1").Single(); 9338var x1Ref = GetReferences(tree, "x1").Single(); 9349var x6Ref = GetReferences(tree, "x6").Single(); 9358var x14Ref = GetReferences(tree, "x14").Single(); 9431var x1Ref = GetReferences(tree, "x1").Single(); 9442var x6Ref = GetReferences(tree, "x6").Single(); 9451var x14Ref = GetReferences(tree, "x14").Single(); 9894var x1Ref = GetReferences(tree, "x1").Single(); 9905var x6Ref = GetReferences(tree, "x6").Single(); 9914var x14Ref = GetReferences(tree, "x14").Single(); 9989var x1Ref = GetReferences(tree, "x1").Single(); 10000var x6Ref = GetReferences(tree, "x6").Single(); 10009var x14Ref = GetReferences(tree, "x14").Single(); 10769var y12Ref = GetReferences(tree, "y12").Single(); 10821var x1Ref = GetReferences(tree, "x1").Single(); 11050var x3Ref = GetReferences(tree, "x3").Single(); 11054var x4Ref = GetReferences(tree, "x4").Single(); 11058var x5Ref = GetReferences(tree, "x5").Single(); 11187var x3Ref = GetReferences(tree, "x3").Single(); 11191var x4Ref = GetReferences(tree, "x4").Single(); 11195var x5Ref = GetReferences(tree, "x5").Single(); 11269var x3Ref = GetReferences(tree, "x3").Single(); 11273var x4Ref = GetReferences(tree, "x4").Single(); 11277var x5Ref = GetReferences(tree, "x5").Single(); 11431var x1Ref = GetReferences(tree, "x1").Single(); 12160var y13Ref = GetReference(tree, "y13"); 12427var yRef = GetReferences(tree, id).Single(); 12503var yRef = GetReferences(tree, id).Single(); 12782var y1Ref = GetReferences(tree, "y1").Single(); 12793var y3Ref = GetReferences(tree, "y3").Single(); 12797var y4Ref = GetReferences(tree, "y4").Single(); 12872var yRef = GetReferences(tree, id).Single(); 12924var yRef = GetReferences(tree, "y1").Single(); 12966var x1Ref = GetReferences(tree, "x1").Single(); 13213var x2Ref = GetReferences(tree, "x2").Single(); 13217var x3Ref = GetReferences(tree, "x3").Single(); 13240var x9Ref = GetReferences(tree, "x9").Single(); 13244var x10Ref = GetReferences(tree, "x10").Single(); 13700var x1Ref = GetReferences(tree, "x1").Single(); 14259var yRef = GetReference(tree, "y1"); 14306var yRef = GetReference(tree, "y1"); 14355var yRef = GetReference(tree, "y1"); 14397var yRef = GetReference(tree, "y1"); 14439var yRef = GetReference(tree, "y1"); 14484var yRef = GetReference(tree, "y1"); 14526var yRef = GetReference(tree, "y1"); 14571var yRef = GetReference(tree, "y1"); 14575var zRef = GetReference(tree, "z1"); 14620var yRef = GetReference(tree, "y1"); 14674var yRef = GetReferences(tree, "y1").Last(); 14733var yRef = GetReferences(tree, "y1").Last(); 14780var yRef = GetReference(tree, "y1"); 14784var zRef = GetReference(tree, "z1"); 14830var yRef = GetReference(tree, "y1"); 14834var zRef = GetReference(tree, "z1"); 15134var x2Ref = GetReferences(tree, "x2").Single(); 15138var x3Ref = GetReferences(tree, "x3").Single(); 15161var x9Ref = GetReferences(tree, "x9").Single(); 15165var x10Ref = GetReferences(tree, "x10").Single(); 15574var x10Ref = GetReferences(tree, "x10").Single(); 15582var y12Ref = GetReferences(tree, "y12").Single(); 15787var x10Ref = GetReferences(tree, "x10").Single(); 15795var y12Ref = GetReferences(tree, "y12").Single(); 16000var x10Ref = GetReferences(tree, "x10").Single(); 16008var y12Ref = GetReferences(tree, "y12").Single(); 16447var y12Ref = GetReferences(tree, "y12").Single(); 16499var x1Ref = GetReferences(tree, "x1").Single(); 16971var x2Ref = GetReferences(tree, "x2").Single(); 16975var x3Ref = GetReferences(tree, "x3").Single(); 17001var x9Ref = GetReferences(tree, "x9").Single(); 17055var x1Ref = GetReferences(tree, "x1").Single(); 17398var x2Ref = GetReferences(tree, "x2").Single(); 17402var x3Ref = GetReferences(tree, "x3").Single(); 17428var x9Ref = GetReferences(tree, "x9").Single(); 17432var x10Ref = GetReferences(tree, "x10").Single(); 17681var x1Ref = GetReference(tree, "x1"); 17714var x1Ref = GetReference(tree, "x1"); 17997var x1Ref = GetReference(tree, "x1"); 18071var x1Ref = GetReference(tree, "x1"); 18106var x1Ref = GetReference(tree, "x1"); 18145var x1Ref = GetReference(tree, "x1"); 18186var x1Ref = GetReference(tree, "x1"); 18229var x1Ref = GetReference(tree, "x1"); 18272var x1Ref = GetReference(tree, "x1"); 18311var x1Ref = GetReference(tree, "x1"); 18352var x1Ref = GetReference(tree, "x1"); 18387var x1Ref = GetReference(tree, "x1"); 18433var x1Ref = GetReference(tree, "x1"); 18497var x1Ref = GetReference(tree, "x1"); 18546var x1Ref = GetReference(tree, "x1"); 18591var x1Ref = GetReference(tree, "x1"); 18643var x1Ref = GetReference(tree, "x1"); 18687var x1Ref = GetReference(tree, "x1"); 18729var x1Ref = GetReference(tree, "x1"); 18876var x1Ref = GetReference(tree, "x1"); 18920var x1Ref = GetReference(tree, "x1"); 18962var x1Ref = GetReference(tree, "x1"); 19291var x1Ref = GetReference(tree, "x1"); 19332var varRef = GetReferences(tree, "var").Skip(1).Single(); 19366var x1Ref = GetReference(tree, "x1"); 19510var x1Ref = GetReference(tree, "x1"); 19549var x1Ref = GetReference(tree, "x1"); 19593var x1Ref = GetReference(tree, "x1"); 19662var x1Ref = GetReference(tree, "x1"); 19688var x1Ref = GetReference(tree, "x1"); 19731var x1Ref = GetReference(tree, "x1"); 19771var x1Ref = GetReference(tree, "x1"); 19843var yRef = GetReference(tree, "y"); 19876var yRef = GetReference(tree, "y"); 19909var yRef = GetReference(tree, "y"); 19944var yRef = GetReferences(tree, "y").Last(); 19979var yRef = GetReferences(tree, "y").Last(); 20223var x1Ref = GetReference(tree, "x1"); 20251var x1Ref = GetReference(tree, "x1"); 20616var x1Ref = GetReference(tree, "x1"); 20661var x4Ref = GetReference(tree, "x4"); 20776var x1Ref = GetReference(tree, "x1"); 20779var x2Ref = GetReference(tree, "x2"); 20782var x3Ref = GetReference(tree, "x3"); 20785var x4Ref = GetReference(tree, "x4"); 20921var x1Ref = GetReferences(tree, "x1").Single(); 20934var x6Ref = GetReferences(tree, "x6").Single(); 20945var x14Ref = GetReferences(tree, "x14").Single(); 21416var yRef = GetReference(tree, "y1"); 21420var zRef = GetReference(tree, "z1"); 21699var y12Ref = GetReferences(tree, "y12").Single(); 21826var x7Ref = GetReferences(tree, "x7").Single(); 22062var x10Ref = GetReferences(tree, "x10").Single(); 22071var y12Ref = GetReferences(tree, "y12").Single(); 22479var y12Ref = GetReferences(tree, "y12").Single(); 22662var x3Ref = GetReferences(tree, "x3").Single(); 22667var x4Ref = GetReferences(tree, "x4").Single(); 22672var x5Ref = GetReferences(tree, "x5").Single(); 22698params IdentifierNameSyntax[] references) 22714private static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references) 22716foreach (var reference in references) 22785var x3Ref = GetReferences(tree, "x3").Single(); 22790var x4Ref = GetReferences(tree, "x4").Single(); 22795var x5Ref = GetReferences(tree, "x5").Single(); 22867var x3Ref = GetReferences(tree, "x3").Single(); 22872var x4Ref = GetReferences(tree, "x4").Single(); 22877var x5Ref = GetReferences(tree, "x5").Single(); 22951var x3Ref = GetReferences(tree, "x3").Single(); 22956var x4Ref = GetReferences(tree, "x4").Single(); 22961var x5Ref = GetReferences(tree, "x5").Single(); 23450var x2Ref = GetReferences(tree, "x2").Single(); 23454var x3Ref = GetReferences(tree, "x3").Single(); 23483var x2Ref = GetReferences(tree, "x2").Single(); 23487var x3Ref = GetReferences(tree, "x3").Single(); 23717var y12Ref = GetReferences(tree, "y12").Single(); 23815var y12Ref = GetReferences(tree, "y12").Single(); 24055var y12Ref = GetReferences(tree, "y12").Single(); 24159var y12Ref = GetReferences(tree, "y12").Single(); 24298var x3Ref = GetReferences(tree, "x3").Single(); 24302var x4Ref = GetReferences(tree, "x4").Single(); 24306var x5Ref = GetReferences(tree, "x5").Single(); 24404var x3Ref = GetReferences(tree, "x3").Single(); 24408var x4Ref = GetReferences(tree, "x4").Single(); 24412var x5Ref = GetReferences(tree, "x5").Single(); 24497var x1Ref = GetReferences(tree, "x1").Single(); 24528var x1Ref = GetReferences(tree, "x1").Single(); 25180var yRef = GetReferences(tree, "y1").Single(); 25333var x10Ref = GetReferences(tree, "x10").Single(); 25341var y12Ref = GetReferences(tree, "y12").Single(); 25432var x10Ref = GetReferences(tree, "x10").Single(); 25440var y12Ref = GetReferences(tree, "y12").Single(); 25576var x2Ref = GetReferences(tree, "x2").Single(); 25580var x3Ref = GetReferences(tree, "x3").Single(); 25584var x4Ref = GetReferences(tree, "x4").Single(); 25620var x2Ref = GetReferences(tree, "x2").Single(); 25625var x3Ref = GetReferences(tree, "x3").Single(); 25629var x4Ref = GetReferences(tree, "x4").Single(); 25701var x2Ref = GetReferences(tree, "x2").Single(); 25705var x3Ref = GetReferences(tree, "x3").Single(); 25709var x4Ref = GetReferences(tree, "x4").Single(); 25745var x2Ref = GetReferences(tree, "x2").Single(); 25750var x3Ref = GetReferences(tree, "x3").Single(); 25754var x4Ref = GetReferences(tree, "x4").Single(); 25881var x2Ref = GetReferences(tree, "x2").Single(); 25885var x3Ref = GetReferences(tree, "x3").Single(); 25889var x4Ref = GetReferences(tree, "x4").Single(); 25941var x2Ref = GetReferences(tree, "x2").Single(); 25946var x3Ref = GetReferences(tree, "x3").Single(); 25950var x4Ref = GetReferences(tree, "x4").Single(); 26038var x2Ref = GetReferences(tree, "x2").Single(); 26042var x3Ref = GetReferences(tree, "x3").Single(); 26046var x4Ref = GetReferences(tree, "x4").Single(); 26095var x2Ref = GetReferences(tree, "x2").Single(); 26100var x3Ref = GetReferences(tree, "x3").Single(); 26104var x4Ref = GetReferences(tree, "x4").Single(); 26291var x2Ref = GetReferences(tree, "x2").Single(); 26295var x3Ref = GetReferences(tree, "x3").Single(); 26299var x4Ref = GetReferences(tree, "x4").Single(); 26338var x2Ref = GetReferences(tree, "x2").Single(); 26343var x3Ref = GetReferences(tree, "x3").Single(); 26347var x4Ref = GetReferences(tree, "x4").Single(); 26434var x2Ref = GetReferences(tree, "x2").Single(); 26438var x3Ref = GetReferences(tree, "x3").Single(); 26442var x4Ref = GetReferences(tree, "x4").Single(); 26481var x2Ref = GetReferences(tree, "x2").Single(); 26486var x3Ref = GetReferences(tree, "x3").Single(); 26490var x4Ref = GetReferences(tree, "x4").Single(); 26565var x2Ref = GetReferences(tree, "x2").Single(); 26569var x3Ref = GetReferences(tree, "x3").Single(); 26573var x4Ref = GetReferences(tree, "x4").Single(); 26625var x2Ref = GetReferences(tree, "x2").Single(); 26630var x3Ref = GetReferences(tree, "x3").Single(); 26634var x4Ref = GetReferences(tree, "x4").Single(); 26709var x2Ref = GetReferences(tree, "x2").Single(); 26713var x3Ref = GetReferences(tree, "x3").Single(); 26717var x4Ref = GetReferences(tree, "x4").Single(); 26769var x2Ref = GetReferences(tree, "x2").Single(); 26774var x3Ref = GetReferences(tree, "x3").Single(); 26778var x4Ref = GetReferences(tree, "x4").Single(); 26900var x2Ref = GetReferences(tree, "x2").Single(); 26904var x3Ref = GetReferences(tree, "x3").Single(); 26908var x4Ref = GetReferences(tree, "x4").Single(); 26944var x2Ref = GetReferences(tree, "x2").Single(); 26949var x3Ref = GetReferences(tree, "x3").Single(); 26953var x4Ref = GetReferences(tree, "x4").Single(); 27031var x2Ref = GetReferences(tree, "x2").Single(); 27035var x3Ref = GetReferences(tree, "x3").Single(); 27039var x4Ref = GetReferences(tree, "x4").Single(); 27075var x2Ref = GetReferences(tree, "x2").Single(); 27080var x3Ref = GetReferences(tree, "x3").Single(); 27084var x4Ref = GetReferences(tree, "x4").Single(); 27167var x2Ref = GetReferences(tree, "x2").Single(); 27171var x3Ref = GetReferences(tree, "x3").Single(); 27175var x4Ref = GetReferences(tree, "x4").Single(); 27221var x2Ref = GetReferences(tree, "x2").Single(); 27226var x3Ref = GetReferences(tree, "x3").Single(); 27230var x4Ref = GetReferences(tree, "x4").Single(); 27320var x2Ref = GetReferences(tree, "x2").Single(); 27324var x3Ref = GetReferences(tree, "x3").Single(); 27328var x4Ref = GetReferences(tree, "x4").Single(); 27374var x2Ref = GetReferences(tree, "x2").Single(); 27379var x3Ref = GetReferences(tree, "x3").Single(); 27383var x4Ref = GetReferences(tree, "x4").Single(); 27522var x2Ref = GetReferences(tree, "x2").Single(); 27527var x3Ref = GetReferences(tree, "x3").Single(); 27532var x4Ref = GetReferences(tree, "x4").Single(); 27595var x2Ref = GetReferences(tree, "x2").Single(); 27600var x3Ref = GetReferences(tree, "x3").Single(); 27605var x4Ref = GetReferences(tree, "x4").Single(); 27699var x2Ref = GetReferences(tree, "x2").Single(); 27704var x3Ref = GetReferences(tree, "x3").Single(); 27709var x4Ref = GetReferences(tree, "x4").Single(); 27772var x2Ref = GetReferences(tree, "x2").Single(); 27777var x3Ref = GetReferences(tree, "x3").Single(); 27782var x4Ref = GetReferences(tree, "x4").Single(); 27912var x2Ref = GetReferences(tree, "x2").Single(); 27917var x3Ref = GetReferences(tree, "x3").Single(); 27922var x4Ref = GetReferences(tree, "x4").Single(); 27985var x2Ref = GetReferences(tree, "x2").Single(); 27990var x3Ref = GetReferences(tree, "x3").Single(); 27995var x4Ref = GetReferences(tree, "x4").Single(); 28090var x2Ref = GetReferences(tree, "x2").Single(); 28095var x3Ref = GetReferences(tree, "x3").Single(); 28100var x4Ref = GetReferences(tree, "x4").Single(); 28163var x2Ref = GetReferences(tree, "x2").Single(); 28168var x3Ref = GetReferences(tree, "x3").Single(); 28173var x4Ref = GetReferences(tree, "x4").Single(); 28309var x2Ref = GetReferences(tree, "x2").Single(); 28313var x3Ref = GetReferences(tree, "x3").Single(); 28317var x4Ref = GetReferences(tree, "x4").Single(); 28363var x2Ref = GetReferences(tree, "x2").Single(); 28368var x3Ref = GetReferences(tree, "x3").Single(); 28372var x4Ref = GetReferences(tree, "x4").Single(); 28460var x2Ref = GetReferences(tree, "x2").Single(); 28464var x3Ref = GetReferences(tree, "x3").Single(); 28468var x4Ref = GetReferences(tree, "x4").Single(); 28514var x2Ref = GetReferences(tree, "x2").Single(); 28519var x3Ref = GetReferences(tree, "x3").Single(); 28523var x4Ref = GetReferences(tree, "x4").Single(); 28713var x2Ref = GetReferences(tree, "x2").Single(); 28717var x3Ref = GetReferences(tree, "x3").Single(); 28721var x4Ref = GetReferences(tree, "x4").Single(); 28774var x2Ref = GetReferences(tree, "x2").Single(); 28779var x3Ref = GetReferences(tree, "x3").Single(); 28783var x4Ref = GetReferences(tree, "x4").Single(); 28881var x2Ref = GetReferences(tree, "x2").Single(); 28885var x3Ref = GetReferences(tree, "x3").Single(); 28889var x4Ref = GetReferences(tree, "x4").Single(); 28937var x2Ref = GetReferences(tree, "x2").Single(); 28942var x3Ref = GetReferences(tree, "x3").Single(); 28946var x4Ref = GetReferences(tree, "x4").Single(); 29032var x2Ref = GetReferences(tree, "x2").Single(); 29036var x3Ref = GetReferences(tree, "x3").Single(); 29040var x4Ref = GetReferences(tree, "x4").Single(); 29088var x2Ref = GetReferences(tree, "x2").Single(); 29093var x3Ref = GetReferences(tree, "x3").Single(); 29097var x4Ref = GetReferences(tree, "x4").Single(); 29239var x2Ref = GetReferences(tree, "x2").Single(); 29243var x3Ref = GetReferences(tree, "x3").Single(); 29247var x4Ref = GetReferences(tree, "x4").Single(); 29306var x2Ref = GetReferences(tree, "x2").Single(); 29311var x3Ref = GetReferences(tree, "x3").Single(); 29315var x4Ref = GetReferences(tree, "x4").Single(); 29415var x2Ref = GetReferences(tree, "x2").Single(); 29419var x3Ref = GetReferences(tree, "x3").Single(); 29423var x4Ref = GetReferences(tree, "x4").Single(); 29482var x2Ref = GetReferences(tree, "x2").Single(); 29487var x3Ref = GetReferences(tree, "x3").Single(); 29491var x4Ref = GetReferences(tree, "x4").Single(); 29599var x1Ref = GetReferences(tree, "x1").Single(); 29702var x2Ref = GetReferences(tree, "x2").Single(); 29706var x3Ref = GetReferences(tree, "x3").Single(); 29710var x4Ref = GetReferences(tree, "x4").Single(); 29778var x2Ref = GetReferences(tree, "x2").Single(); 29783var x3Ref = GetReferences(tree, "x3").Single(); 29787var x4Ref = GetReferences(tree, "x4").Single(); 29793var x5Ref = GetReferences(tree, "x5").Single(); 29798var x6Ref = GetReferences(tree, "x6").Single(); 29903var x2Ref = GetReferences(tree, "x2").Single(); 29907var x3Ref = GetReferences(tree, "x3").Single(); 29911var x4Ref = GetReferences(tree, "x4").Single(); 29979var x2Ref = GetReferences(tree, "x2").Single(); 29984var x3Ref = GetReferences(tree, "x3").Single(); 29988var x4Ref = GetReferences(tree, "x4").Single(); 29994var x5Ref = GetReferences(tree, "x5").Single(); 29999var x6Ref = GetReferences(tree, "x6").Single(); 30143var x2Ref = GetReferences(tree, "x2").Single(); 30147var x3Ref = GetReferences(tree, "x3").Single(); 30151var x4Ref = GetReferences(tree, "x4").Single(); 30157var x5Ref = GetReferences(tree, "x5").Single(); 30161var x6Ref = GetReferences(tree, "x6").Single(); 30204var x2Ref = GetReferences(tree, "x2").Single(); 30209var x3Ref = GetReferences(tree, "x3").Single(); 30213var x4Ref = GetReferences(tree, "x4").Single(); 30219var x5Ref = GetReferences(tree, "x5").Single(); 30224var x6Ref = GetReferences(tree, "x6").Single(); 30315var x2Ref = GetReferences(tree, "x2").Single(); 30319var x3Ref = GetReferences(tree, "x3").Single(); 30323var x4Ref = GetReferences(tree, "x4").Single(); 30329var x5Ref = GetReferences(tree, "x5").Single(); 30333var x6Ref = GetReferences(tree, "x6").Single(); 30376var x2Ref = GetReferences(tree, "x2").Single(); 30381var x3Ref = GetReferences(tree, "x3").Single(); 30385var x4Ref = GetReferences(tree, "x4").Single(); 30391var x5Ref = GetReferences(tree, "x5").Single(); 30396var x6Ref = GetReferences(tree, "x6").Single(); 30619var x1Ref = GetReferences(tree, "x1").Single(); 30623var x2Ref = GetReferences(tree, "x2").Single(); 30704var x2Ref = GetReferences(tree, "x2").Single(); 30708var x3Ref = GetReferences(tree, "x3").Single(); 30712var x4Ref = GetReferences(tree, "x4").Single(); 30718var x5Ref = GetReferences(tree, "x5").Single(); 30775var x2Ref = GetReferences(tree, "x2").Single(); 30780var x3Ref = GetReferences(tree, "x3").Single(); 30785var x4Ref = GetReferences(tree, "x4").Single(); 30792var x5Ref = GetReferences(tree, "x5").Single(); 30875var x2Ref = GetReferences(tree, "x2").Single(); 30879var x3Ref = GetReferences(tree, "x3").Single(); 30883var x4Ref = GetReferences(tree, "x4").Single(); 30889var x5Ref = GetReferences(tree, "x5").Single(); 30946var x2Ref = GetReferences(tree, "x2").Single(); 30951var x3Ref = GetReferences(tree, "x3").Single(); 30956var x4Ref = GetReferences(tree, "x4").Single(); 30963var x5Ref = GetReferences(tree, "x5").Single(); 31235var x2Ref = GetReferences(tree, "x2").Single(); 31239var x3Ref = GetReferences(tree, "x3").Single(); 31243var x4Ref = GetReferences(tree, "x4").Single(); 31249var x5Ref = GetReferences(tree, "x5").Single(); 31253var x6Ref = GetReferences(tree, "x6").Single(); 31296var x2Ref = GetReferences(tree, "x2").Single(); 31301var x3Ref = GetReferences(tree, "x3").Single(); 31306var x4Ref = GetReferences(tree, "x4").Single(); 31313var x5Ref = GetReferences(tree, "x5").Single(); 31318var x6Ref = GetReferences(tree, "x6").Single(); 31408var x2Ref = GetReferences(tree, "x2").Single(); 31412var x3Ref = GetReferences(tree, "x3").Single(); 31416var x4Ref = GetReferences(tree, "x4").Single(); 31422var x5Ref = GetReferences(tree, "x5").Single(); 31426var x6Ref = GetReferences(tree, "x6").Single(); 31469var x2Ref = GetReferences(tree, "x2").Single(); 31474var x3Ref = GetReferences(tree, "x3").Single(); 31479var x4Ref = GetReferences(tree, "x4").Single(); 31486var x5Ref = GetReferences(tree, "x5").Single(); 31491var x6Ref = GetReferences(tree, "x6").Single(); 31715var x1Ref = GetReferences(tree, "x1").Single(); 31719var x2Ref = GetReferences(tree, "x2").Single(); 32523var x1Ref = GetReference(tree, "x1"); 32669var x1Ref = GetReference(tree, "x1"); 32705var x1Ref = GetReference(tree, "x1"); 32712params IdentifierNameSyntax[] references) 32720params IdentifierNameSyntax[] references) 32729params IdentifierNameSyntax[] references) 32763foreach (var reference in references) 32950var x1Ref = GetReference(tree, "x1"); 32996var discard3 = GetDiscardIdentifiers(tree).First(); 33095var discard3 = GetDiscardIdentifiers(tree).First(); 33506var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "x").Single(); 33694var z1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "z1").First(); 33783var x3Ref = GetReference(tree, "x3"); 33787var x4Ref = GetReference(tree, "x4"); 33791var x5Ref = GetReference(tree, "x5"); 33881var x3Ref = GetReference(tree, "x3"); 33885var x4Ref = GetReference(tree, "x4"); 33889var x5Ref = GetReference(tree, "x5"); 33980var x3Ref = GetReference(tree, "x3"); 33984var x4Ref = GetReference(tree, "x4"); 33988var x5Ref = GetReference(tree, "x5"); 34078var x3Ref = GetReference(tree, "x3"); 34082var x4Ref = GetReference(tree, "x4"); 34086var x5Ref = GetReference(tree, "x5"); 34151var x1Ref = GetReference(tree, "x1"); 34207var x1Ref = GetReference(tree, "x1"); 34273var x1Ref = GetReferences(tree, "x1").Single(); 34278var x2Ref = GetReferences(tree, "x2").Single(); 35179var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35218var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35262var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35293var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35332var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35364var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35400var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35439var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35469var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35506var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single(); 35662var identifierBefore = GetReferences(tree, "G").Single(); 35668var identifierAfter = statementAfter.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "G"); 35778var zRef = GetReference(tree, "z"); 35820var zRef = GetReference(tree, "z"); 35849var zRef = GetReference(tree, "z"); 35895var zRef = GetReference(tree, "z"); 36323var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test3").Last();
Semantics\ParamsCollectionTests.cs (8)
5893var f1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F1").Single(); 5895var f2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F2").Single(); 5975var f1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F1").Single(); 5977var f2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F2").Single();
Semantics\PatternMatchingTestBase.cs (17)
55protected static IdentifierNameSyntax GetReference(SyntaxTree tree, string name) 60protected static IEnumerable<IdentifierNameSyntax> GetReferences(SyntaxTree tree, string name) 62return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name); 65protected static void VerifyModelForDeclarationOrVarSimplePattern(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 70protected static void VerifyModelForDeclarationOrVarSimplePatternWithoutDataFlow(SemanticModel model, SingleVariableDesignationSyntax decl, params IdentifierNameSyntax[] references) 79params IdentifierNameSyntax[] references) 123foreach (var reference in references) 191protected static void VerifyNotAPatternField(SemanticModel model, IdentifierNameSyntax reference) 201protected static void VerifyNotAPatternLocal(SemanticModel model, IdentifierNameSyntax reference) 215protected static void VerifyNotInScope(SemanticModel model, IdentifierNameSyntax reference) 225params IdentifierNameSyntax[] references) 233params IdentifierNameSyntax[] references) 242params IdentifierNameSyntax[] references) 299foreach (var reference in references) 373params IdentifierNameSyntax[] references) 415protected static void VerifyModelNotSupported(SemanticModel model, params IdentifierNameSyntax[] references) 417foreach (var reference in references)
Semantics\PatternMatchingTests.cs (22)
780var x1Ref = GetReferences(tree, "x1").Single(); 849var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 893var yRef = GetReferences(tree, "y1").Single(); 1433var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1483var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1592var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1657var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1663var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").ToArray(); 1669var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").ToArray(); 1740var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").ToArray(); 1746var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").ToArray(); 2703var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 2748var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 2792var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 2844var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 3041var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 3088var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 3446var o1 = GetReferences(tree, "o1").Single(); 3481var x1Ref = GetReferences(tree, "x1").Single(); 3486var x2Ref = GetReferences(tree, "x2").Single(); 4251var x2Ref = GetReferences(tree, "x2").Single();
Semantics\PatternMatchingTests_Global.cs (235)
85var x2Ref = GetReferences(tree, "x2").Single(); 89var x3Ref = GetReferences(tree, "x3").Single(); 93var x4Ref = GetReferences(tree, "x4").Single(); 129var x2Ref = GetReferences(tree, "x2").Single(); 134var x3Ref = GetReferences(tree, "x3").Single(); 138var x4Ref = GetReferences(tree, "x4").Single(); 207var x2Ref = GetReferences(tree, "x2").Single(); 211var x3Ref = GetReferences(tree, "x3").Single(); 215var x4Ref = GetReferences(tree, "x4").Single(); 251var x2Ref = GetReferences(tree, "x2").Single(); 256var x3Ref = GetReferences(tree, "x3").Single(); 260var x4Ref = GetReferences(tree, "x4").Single(); 377var x2Ref = GetReferences(tree, "x2").Single(); 381var x3Ref = GetReferences(tree, "x3").Single(); 385var x4Ref = GetReferences(tree, "x4").Single(); 437var x2Ref = GetReferences(tree, "x2").Single(); 442var x3Ref = GetReferences(tree, "x3").Single(); 446var x4Ref = GetReferences(tree, "x4").Single(); 529var x2Ref = GetReferences(tree, "x2").Single(); 533var x3Ref = GetReferences(tree, "x3").Single(); 537var x4Ref = GetReferences(tree, "x4").Single(); 586var x2Ref = GetReferences(tree, "x2").Single(); 591var x3Ref = GetReferences(tree, "x3").Single(); 595var x4Ref = GetReferences(tree, "x4").Single(); 766var x2Ref = GetReferences(tree, "x2").Single(); 770var x3Ref = GetReferences(tree, "x3").Single(); 774var x4Ref = GetReferences(tree, "x4").Single(); 813var x2Ref = GetReferences(tree, "x2").Single(); 818var x3Ref = GetReferences(tree, "x3").Single(); 822var x4Ref = GetReferences(tree, "x4").Single(); 904var x2Ref = GetReferences(tree, "x2").Single(); 908var x3Ref = GetReferences(tree, "x3").Single(); 912var x4Ref = GetReferences(tree, "x4").Single(); 951var x2Ref = GetReferences(tree, "x2").Single(); 956var x3Ref = GetReferences(tree, "x3").Single(); 960var x4Ref = GetReferences(tree, "x4").Single(); 1030var x2Ref = GetReferences(tree, "x2").Single(); 1034var x3Ref = GetReferences(tree, "x3").Single(); 1038var x4Ref = GetReferences(tree, "x4").Single(); 1083var x2Ref = GetReferences(tree, "x2").Single(); 1088var x3Ref = GetReferences(tree, "x3").Single(); 1092var x4Ref = GetReferences(tree, "x4").Single(); 1162var x2Ref = GetReferences(tree, "x2").Single(); 1166var x3Ref = GetReferences(tree, "x3").Single(); 1170var x4Ref = GetReferences(tree, "x4").Single(); 1215var x2Ref = GetReferences(tree, "x2").Single(); 1220var x3Ref = GetReferences(tree, "x3").Single(); 1224var x4Ref = GetReferences(tree, "x4").Single(); 1336var x2Ref = GetReferences(tree, "x2").Single(); 1340var x3Ref = GetReferences(tree, "x3").Single(); 1344var x4Ref = GetReferences(tree, "x4").Single(); 1380var x2Ref = GetReferences(tree, "x2").Single(); 1385var x3Ref = GetReferences(tree, "x3").Single(); 1389var x4Ref = GetReferences(tree, "x4").Single(); 1462var x2Ref = GetReferences(tree, "x2").Single(); 1466var x3Ref = GetReferences(tree, "x3").Single(); 1470var x4Ref = GetReferences(tree, "x4").Single(); 1506var x2Ref = GetReferences(tree, "x2").Single(); 1511var x3Ref = GetReferences(tree, "x3").Single(); 1515var x4Ref = GetReferences(tree, "x4").Single(); 1593var x2Ref = GetReferences(tree, "x2").Single(); 1597var x3Ref = GetReferences(tree, "x3").Single(); 1601var x4Ref = GetReferences(tree, "x4").Single(); 1647var x2Ref = GetReferences(tree, "x2").Single(); 1652var x3Ref = GetReferences(tree, "x3").Single(); 1656var x4Ref = GetReferences(tree, "x4").Single(); 1741var x2Ref = GetReferences(tree, "x2").Single(); 1745var x3Ref = GetReferences(tree, "x3").Single(); 1749var x4Ref = GetReferences(tree, "x4").Single(); 1795var x2Ref = GetReferences(tree, "x2").Single(); 1800var x3Ref = GetReferences(tree, "x3").Single(); 1804var x4Ref = GetReferences(tree, "x4").Single(); 1935var x2Ref = GetReferences(tree, "x2").Single(); 1940var x3Ref = GetReferences(tree, "x3").Single(); 1945var x4Ref = GetReferences(tree, "x4").Single(); 2005var x2Ref = GetReferences(tree, "x2").Single(); 2010var x3Ref = GetReferences(tree, "x3").Single(); 2015var x4Ref = GetReferences(tree, "x4").Single(); 2106var x2Ref = GetReferences(tree, "x2").Single(); 2111var x3Ref = GetReferences(tree, "x3").Single(); 2116var x4Ref = GetReferences(tree, "x4").Single(); 2176var x2Ref = GetReferences(tree, "x2").Single(); 2181var x3Ref = GetReferences(tree, "x3").Single(); 2186var x4Ref = GetReferences(tree, "x4").Single(); 2309var x2Ref = GetReferences(tree, "x2").Single(); 2314var x3Ref = GetReferences(tree, "x3").Single(); 2319var x4Ref = GetReferences(tree, "x4").Single(); 2379var x2Ref = GetReferences(tree, "x2").Single(); 2384var x3Ref = GetReferences(tree, "x3").Single(); 2389var x4Ref = GetReferences(tree, "x4").Single(); 2481var x2Ref = GetReferences(tree, "x2").Single(); 2486var x3Ref = GetReferences(tree, "x3").Single(); 2491var x4Ref = GetReferences(tree, "x4").Single(); 2551var x2Ref = GetReferences(tree, "x2").Single(); 2556var x3Ref = GetReferences(tree, "x3").Single(); 2561var x4Ref = GetReferences(tree, "x4").Single(); 2688var x2Ref = GetReferences(tree, "x2").Single(); 2692var x3Ref = GetReferences(tree, "x3").Single(); 2696var x4Ref = GetReferences(tree, "x4").Single(); 2742var x2Ref = GetReferences(tree, "x2").Single(); 2747var x3Ref = GetReferences(tree, "x3").Single(); 2751var x4Ref = GetReferences(tree, "x4").Single(); 2834var x2Ref = GetReferences(tree, "x2").Single(); 2838var x3Ref = GetReferences(tree, "x3").Single(); 2842var x4Ref = GetReferences(tree, "x4").Single(); 2888var x2Ref = GetReferences(tree, "x2").Single(); 2893var x3Ref = GetReferences(tree, "x3").Single(); 2897var x4Ref = GetReferences(tree, "x4").Single(); 3077var x2Ref = GetReferences(tree, "x2").Single(); 3081var x3Ref = GetReferences(tree, "x3").Single(); 3085var x4Ref = GetReferences(tree, "x4").Single(); 3091var x5Ref = GetReferences(tree, "x5").Single(); 3095var x6Ref = GetReferences(tree, "x6").Single(); 3136var x2Ref = GetReferences(tree, "x2").Single(); 3141var x3Ref = GetReferences(tree, "x3").Single(); 3145var x4Ref = GetReferences(tree, "x4").Single(); 3151var x5Ref = GetReferences(tree, "x5").Single(); 3156var x6Ref = GetReferences(tree, "x6").Single(); 3236var x2Ref = GetReferences(tree, "x2").Single(); 3240var x3Ref = GetReferences(tree, "x3").Single(); 3244var x4Ref = GetReferences(tree, "x4").Single(); 3292var x2Ref = GetReferences(tree, "x2").Single(); 3297var x3Ref = GetReferences(tree, "x3").Single(); 3301var x4Ref = GetReferences(tree, "x4").Single(); 3382var x2Ref = GetReferences(tree, "x2").Single(); 3386var x3Ref = GetReferences(tree, "x3").Single(); 3390var x4Ref = GetReferences(tree, "x4").Single(); 3438var x2Ref = GetReferences(tree, "x2").Single(); 3443var x3Ref = GetReferences(tree, "x3").Single(); 3447var x4Ref = GetReferences(tree, "x4").Single(); 3579var x2Ref = GetReferences(tree, "x2").Single(); 3583var x3Ref = GetReferences(tree, "x3").Single(); 3587var x4Ref = GetReferences(tree, "x4").Single(); 3646var x2Ref = GetReferences(tree, "x2").Single(); 3651var x3Ref = GetReferences(tree, "x3").Single(); 3655var x4Ref = GetReferences(tree, "x4").Single(); 3750var x2Ref = GetReferences(tree, "x2").Single(); 3754var x3Ref = GetReferences(tree, "x3").Single(); 3758var x4Ref = GetReferences(tree, "x4").Single(); 3817var x2Ref = GetReferences(tree, "x2").Single(); 3822var x3Ref = GetReferences(tree, "x3").Single(); 3826var x4Ref = GetReferences(tree, "x4").Single(); 3975var x2Ref = GetReferences(tree, "x2").Single(); 3979var x3Ref = GetReferences(tree, "x3").Single(); 3983var x4Ref = GetReferences(tree, "x4").Single(); 4051var x2Ref = GetReferences(tree, "x2").Single(); 4056var x3Ref = GetReferences(tree, "x3").Single(); 4060var x4Ref = GetReferences(tree, "x4").Single(); 4173var x2Ref = GetReferences(tree, "x2").Single(); 4177var x3Ref = GetReferences(tree, "x3").Single(); 4181var x4Ref = GetReferences(tree, "x4").Single(); 4249var x2Ref = GetReferences(tree, "x2").Single(); 4254var x3Ref = GetReferences(tree, "x3").Single(); 4258var x4Ref = GetReferences(tree, "x4").Single(); 4401var x2Ref = GetReferences(tree, "x2").Single(); 4405var x3Ref = GetReferences(tree, "x3").Single(); 4409var x4Ref = GetReferences(tree, "x4").Single(); 4415var x5Ref = GetReferences(tree, "x5").Single(); 4419var x6Ref = GetReferences(tree, "x6").Single(); 4462var x2Ref = GetReferences(tree, "x2").Single(); 4467var x3Ref = GetReferences(tree, "x3").Single(); 4471var x4Ref = GetReferences(tree, "x4").Single(); 4477var x5Ref = GetReferences(tree, "x5").Single(); 4482var x6Ref = GetReferences(tree, "x6").Single(); 4568var x2Ref = GetReferences(tree, "x2").Single(); 4572var x3Ref = GetReferences(tree, "x3").Single(); 4576var x4Ref = GetReferences(tree, "x4").Single(); 4582var x5Ref = GetReferences(tree, "x5").Single(); 4586var x6Ref = GetReferences(tree, "x6").Single(); 4629var x2Ref = GetReferences(tree, "x2").Single(); 4634var x3Ref = GetReferences(tree, "x3").Single(); 4638var x4Ref = GetReferences(tree, "x4").Single(); 4644var x5Ref = GetReferences(tree, "x5").Single(); 4649var x6Ref = GetReferences(tree, "x6").Single(); 4835var x1Ref = GetReferences(tree, "x1").Single(); 4839var x2Ref = GetReferences(tree, "x2").Single(); 4915var x2Ref = GetReferences(tree, "x2").Single(); 4919var x3Ref = GetReferences(tree, "x3").Single(); 4923var x4Ref = GetReferences(tree, "x4").Single(); 4929var x5Ref = GetReferences(tree, "x5").Single(); 4986var x2Ref = GetReferences(tree, "x2").Single(); 4991var x3Ref = GetReferences(tree, "x3").Single(); 4996var x4Ref = GetReferences(tree, "x4").Single(); 5003var x5Ref = GetReferences(tree, "x5").Single(); 5081var x2Ref = GetReferences(tree, "x2").Single(); 5085var x3Ref = GetReferences(tree, "x3").Single(); 5089var x4Ref = GetReferences(tree, "x4").Single(); 5095var x5Ref = GetReferences(tree, "x5").Single(); 5152var x2Ref = GetReferences(tree, "x2").Single(); 5157var x3Ref = GetReferences(tree, "x3").Single(); 5162var x4Ref = GetReferences(tree, "x4").Single(); 5169var x5Ref = GetReferences(tree, "x5").Single(); 5408var x2Ref = GetReferences(tree, "x2").Single(); 5412var x3Ref = GetReferences(tree, "x3").Single(); 5416var x4Ref = GetReferences(tree, "x4").Single(); 5422var x5Ref = GetReferences(tree, "x5").Single(); 5426var x6Ref = GetReferences(tree, "x6").Single(); 5486var x2Ref = GetReferences(tree, "x2").Single(); 5491var x3Ref = GetReferences(tree, "x3").Single(); 5496var x4Ref = GetReferences(tree, "x4").Single(); 5503var x5Ref = GetReferences(tree, "x5").Single(); 5508var x6Ref = GetReferences(tree, "x6").Single(); 5593var x2Ref = GetReferences(tree, "x2").Single(); 5597var x3Ref = GetReferences(tree, "x3").Single(); 5601var x4Ref = GetReferences(tree, "x4").Single(); 5607var x5Ref = GetReferences(tree, "x5").Single(); 5611var x6Ref = GetReferences(tree, "x6").Single(); 5671var x2Ref = GetReferences(tree, "x2").Single(); 5676var x3Ref = GetReferences(tree, "x3").Single(); 5681var x4Ref = GetReferences(tree, "x4").Single(); 5688var x5Ref = GetReferences(tree, "x5").Single(); 5693var x6Ref = GetReferences(tree, "x6").Single(); 5895var x1Ref = GetReferences(tree, "x1").Single(); 5899var x2Ref = GetReferences(tree, "x2").Single(); 6736var x2Ref = GetReferences(tree, "x2").Single(); 6740var x3Ref = GetReferences(tree, "x3").Single(); 6769var x2Ref = GetReferences(tree, "x2").Single(); 6773var x3Ref = GetReferences(tree, "x3").Single(); 6988var y12Ref = GetReferences(tree, "y12").Single(); 7086var y12Ref = GetReferences(tree, "y12").Single(); 7305var y12Ref = GetReferences(tree, "y12").Single(); 7409var y12Ref = GetReferences(tree, "y12").Single(); 7530var x3Ref = GetReferences(tree, "x3").Single(); 7534var x4Ref = GetReferences(tree, "x4").Single(); 7538var x5Ref = GetReferences(tree, "x5").Single(); 7624var x3Ref = GetReferences(tree, "x3").Single(); 7628var x4Ref = GetReferences(tree, "x4").Single(); 7632var x5Ref = GetReferences(tree, "x5").Single(); 7711var x1Ref = GetReferences(tree, "x1").Single(); 7736var x1Ref = GetReferences(tree, "x1").Single(); 8376var yRef = GetReferences(tree, "y1").Single(); 8523var x10Ref = GetReferences(tree, "x10").Single(); 8531var y12Ref = GetReferences(tree, "y12").Single(); 8622var x10Ref = GetReferences(tree, "x10").Single(); 8630var y12Ref = GetReferences(tree, "y12").Single();
Semantics\PatternMatchingTests_Scope.cs (204)
214var x2Ref = GetReferences(tree, "x2").Single(); 218var x3Ref = GetReferences(tree, "x3").Single(); 244var x9Ref = GetReferences(tree, "x9").Single(); 248var x10Ref = GetReferences(tree, "x10").Single(); 374var x1Ref = GetReferences(tree, "x1").Single(); 599var x2Ref = GetReferences(tree, "x2").Single(); 603var x3Ref = GetReferences(tree, "x3").Single(); 626var x9Ref = GetReferences(tree, "x9").Single(); 630var x10Ref = GetReferences(tree, "x10").Single(); 679var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 713tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, 720var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 869var x2Ref = GetReferences(tree, "x2").Single(); 873var x3Ref = GetReferences(tree, "x3").Single(); 896var x9Ref = GetReferences(tree, "x9").Single(); 900var x10Ref = GetReferences(tree, "x10").Single(); 948var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 982tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, 989var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1182var x5Ref = GetReferences(tree, "x5").Single(); 1213var y12Ref = GetReferences(tree, "y12").Single(); 1252var x1Ref = GetReferences(tree, "x1").Single(); 1522var x3Ref = GetReferences(tree, "x3").Single(); 1526var x4Ref = GetReferences(tree, "x4").Single(); 1530var x5Ref = GetReferences(tree, "x5").Single(); 2222var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).ToArray(); 2358var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).ToArray(); 2421var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).ToArray(); 2486var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 2556var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 2712var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).ToArray(); 2988var x3Ref = GetReferences(tree, "x3").Single(); 2992var x4Ref = GetReferences(tree, "x4").Single(); 2996var x5Ref = GetReferences(tree, "x5").Single(); 3028var x13Ref = GetReferences(tree, "x13").Single(); 3157var x3Ref = GetReferences(tree, "x3").Single(); 3161var x4Ref = GetReferences(tree, "x4").Single(); 3165var x5Ref = GetReferences(tree, "x5").Single(); 3185var x11Ref = GetReferences(tree, "x11").Single(); 3272var x3Ref = GetReferences(tree, "x3").Single(); 3276var x4Ref = GetReferences(tree, "x4").Single(); 3280var x5Ref = GetReferences(tree, "x5").Single(); 3300var x11Ref = GetReferences(tree, "x11").Single(); 3361var x3Ref = GetReferences(tree, "x3").Single(); 3365var x4Ref = GetReferences(tree, "x4").Single(); 3369var x5Ref = GetReferences(tree, "x5").Single(); 3389var x8Ref = GetReference(tree, "x8"); 3394var x9Ref = GetReference(tree, "x9"); 3449var x3Ref = GetReferences(tree, "x3").Single(); 3453var x4Ref = GetReferences(tree, "x4").Single(); 3457var x5Ref = GetReferences(tree, "x5").Single(); 3536var x3Ref = GetReferences(tree, "x3").Single(); 3540var x4Ref = GetReferences(tree, "x4").Single(); 3544var x5Ref = GetReferences(tree, "x5").Single(); 3612var x3Ref = GetReferences(tree, "x3").Single(); 3616var x4Ref = GetReferences(tree, "x4").Single(); 3620var x5Ref = GetReferences(tree, "x5").Single(); 3709var x3Ref = GetReferences(tree, "x3").Single(); 3713var x4Ref = GetReferences(tree, "x4").Single(); 3717var x5Ref = GetReferences(tree, "x5").Single(); 3800var x3Ref = GetReferences(tree, "x3").Single(); 3804var x4Ref = GetReferences(tree, "x4").Single(); 3808var x5Ref = GetReferences(tree, "x5").Single(); 3890var x3Ref = GetReferences(tree, "x3").Single(); 3894var x4Ref = GetReferences(tree, "x4").Single(); 3898var x5Ref = GetReferences(tree, "x5").Single(); 3982var x3Ref = GetReferences(tree, "x3").Single(); 3986var x4Ref = GetReferences(tree, "x4").Single(); 3990var x5Ref = GetReferences(tree, "x5").Single(); 4078var x3Ref = GetReferences(tree, "x3").Single(); 4082var x4Ref = GetReferences(tree, "x4").Single(); 4086var x5Ref = GetReferences(tree, "x5").Single(); 4227var x4Ref = GetReferences(tree, "x4").Single(); 4232var x5Ref = GetReferences(tree, "x5").Single(); 5308var x1Ref = GetReferences(tree, "x1").Single(); 5543var x10Ref = GetReferences(tree, "x10").Single(); 5551var y12Ref = GetReferences(tree, "y12").Single(); 5750var x10Ref = GetReferences(tree, "x10").Single(); 5758var y12Ref = GetReferences(tree, "y12").Single(); 5957var x10Ref = GetReferences(tree, "x10").Single(); 5965var y12Ref = GetReferences(tree, "y12").Single(); 6190var x1Ref = GetReferences(tree, "x1").Single(); 6201var x6Ref = GetReferences(tree, "x6").Single(); 6210var x14Ref = GetReferences(tree, "x14").Single(); 6277var x1Ref = GetReferences(tree, "x1").Single(); 6288var x6Ref = GetReferences(tree, "x6").Single(); 6297var x14Ref = GetReferences(tree, "x14").Single(); 6521var x1Ref = GetReferences(tree, "x1").Single(); 6591var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 6595var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 6602var x6Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x6").Single(); 6606var x8Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x8").ToArray(); 6611var x14Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x14").Single(); 6680var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 6684var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 6691var x6Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x6").Single(); 6695var x8Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x8").ToArray(); 6700var x14Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x14").Single(); 6839var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").ToArray(); 6846var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").ToArray(); 6851var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 6884bool success = model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, statement, out model); 6931var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 7132var y12Ref = GetReferences(tree, "y12").Single(); 7178var x1Ref = GetReferences(tree, "x1").Single(); 7454var y12Ref = GetReferences(tree, "y12").Single(); 7501var x1Ref = GetReferences(tree, "x1").Single(); 7769var y12Ref = GetReferences(tree, "y12").Single(); 7998var y12Ref = GetReferences(tree, "y12").Single(); 8255var y12Ref = GetReferences(tree, "y12").Single(); 8488var y12Ref = GetReferences(tree, "y12").Single(); 8720var y12Ref = GetReferences(tree, "y12").Single(); 8992var x1Ref = GetReferences(tree, "x1").Single(); 8997var x2Ref = GetReferences(tree, "x2").Single(); 9001var x3Ref = GetReferences(tree, "x3").Single(); 9005var x4Ref = GetReferences(tree, "x4").Single(); 9010var x5Ref = GetReferences(tree, "x5").Single(); 9014var x6Ref = GetReferences(tree, "x6").Single(); 9018var x7Ref = GetReferences(tree, "x7").Single(); 9351var y12Ref = GetReferences(tree, "y12").Single(); 9561var y12Ref = GetReferences(tree, "y12").Single(); 9607var x1Ref = GetReferences(tree, "x1").Single(); 9846var y12Ref = GetReferences(tree, "y12").Single(); 10087var x2Ref = GetReferences(tree, "x2").Single(); 10091var x3Ref = GetReferences(tree, "x3").Single(); 10117var x9Ref = GetReferences(tree, "x9").Single(); 10167var x1Ref = GetReferences(tree, "x1").Single(); 10590var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 10598var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").Single(); 10602var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").Single(); 10606var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 10613var x5Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x5").ToArray(); 10618var x8Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x8").ToArray(); 10628var x9Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x9").Single(); 10632var x10Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x10").Single(); 10636var x11Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x11").ToArray(); 10641var x12Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x12").ToArray(); 10686var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 10720tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, 10727var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 11132var yRef = GetReferences(tree, "y1").Single(); 11180var yRef = GetReferences(tree, "y1").Single(); 11230var yRef = GetReferences(tree, "y1").Single(); 11273var yRef = GetReferences(tree, "y1").Single(); 11316var yRef = GetReferences(tree, "y1").Single(); 11362var yRef = GetReferences(tree, "y1").Single(); 11405var yRef = GetReferences(tree, "y1").Single(); 11450var yRef = GetReferences(tree, "y1").Single(); 11453var zRef = GetReferences(tree, "z1").Single(); 11496var xRef = GetReferences(tree, "x1").Single(); 11499var yRef = GetReferences(tree, "y1").Single(); 11502var zRef = GetReferences(tree, "z1").Single(); 11548var xRef = GetReferences(tree, "x1").Single(); 11554foreach (var yRef in yRefs) 11611var xRef = GetReferences(tree, "x1").Single(); 11614var yRef = GetReferences(tree, "y1").Single(); 11666var y1Ref = GetReferences(tree, "y1").Single(); 11669var z0Ref = GetReferences(tree, "z0").Single(); 11672var z1Ref = GetReferences(tree, "z1").Single(); 11726var y1Ref = GetReferences(tree, "y1").Single(); 11729var z0Ref = GetReferences(tree, "z0").Single(); 11732var z1Ref = GetReferences(tree, "z1").Single(); 11735var z2Ref = GetReferences(tree, "z2").Single(); 11808var x1Ref = GetReferences(tree, "x1").Single(); 11821var x6Ref = GetReferences(tree, "x6").Single(); 11832var x14Ref = GetReferences(tree, "x14").Single(); 12251var yRef = GetReference(tree, "y1"); 12255var zRef = GetReference(tree, "z1"); 12529var y12Ref = GetReferences(tree, "y12").Single(); 12652var x7Ref = GetReferences(tree, "x7").Single(); 12883var x10Ref = GetReferences(tree, "x10").Single(); 12892var y12Ref = GetReferences(tree, "y12").Single(); 13282var y12Ref = GetReferences(tree, "y12").Single(); 13448var x3Ref = GetReferences(tree, "x3").Single(); 13453var x4Ref = GetReferences(tree, "x4").Single(); 13458var x5Ref = GetReferences(tree, "x5").Single(); 13536var x3Ref = GetReferences(tree, "x3").Single(); 13541var x4Ref = GetReferences(tree, "x4").Single(); 13546var x5Ref = GetReferences(tree, "x5").Single(); 13613var x3Ref = GetReferences(tree, "x3").Single(); 13618var x4Ref = GetReferences(tree, "x4").Single(); 13623var x5Ref = GetReferences(tree, "x5").Single(); 13692var x3Ref = GetReferences(tree, "x3").Single(); 13697var x4Ref = GetReferences(tree, "x4").Single(); 13702var x5Ref = GetReferences(tree, "x5").Single(); 14029var x2Ref = GetReferences(tree, "x2").Single(); 14033var x3Ref = GetReferences(tree, "x3").Single(); 14059var x7Ref = GetReferences(tree, "x7").Single(); 14063var x8Ref = GetReferences(tree, "x8").Single();
Semantics\PatternMatchingTests2.cs (2)
727foreach (var ident in tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>())
Semantics\PatternMatchingTests3.cs (14)
54var x = subpatterns[0].NameColon.Name; 61var y = subpatterns[1].NameColon.Name; 114var x = subpatterns[0].NameColon.Name; 124var y = subpatterns[1].NameColon.Name; 165var x = subpatterns[0].NameColon.Name; 173var y = subpatterns[1].NameColon.Name; 210var x = subpatterns[0].NameColon.Name; 218var y = subpatterns[1].NameColon.Name; 263var x = subpatterns[0].NameColon.Name; 271var y = subpatterns[1].NameColon.Name; 304var x = subpatterns[0].NameColon.Name; 312var y = subpatterns[1].NameColon.Name; 351var x = subpatterns[0].NameColon.Name; 359var y = subpatterns[1].NameColon.Name;
Semantics\PatternSwitchTests.cs (14)
1515var sRef = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "s").Single(); 1517var iRef = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "i").Single(); 1519var s2Ref = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "s2").Single(); 1521var i2Ref = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "i2").Single(); 1899var x1Ref = GetReferences(tree, "x1").Single(); 1934var x1Ref = GetReferences(tree, "x1").Single(); 3252var node = tree.GetRoot().DescendantNodes() 3253.OfType<IdentifierNameSyntax>() 3283var node = tree.GetRoot().DescendantNodes() 3284.OfType<IdentifierNameSyntax>()
Semantics\PrimaryConstructorTests.cs (50)
1003var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1006foreach (var x in xs) 1072var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 1300var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 1311var y = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").First(); 1324var test = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").First(); 1365var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 1411var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 1467var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1470foreach (var x in xs) 1526var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1529var x = xs[0]; 1615var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1618var x = xs[1]; 1814var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 1854var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 1897var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 1967var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 2425var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2641var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2679var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2716var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2752var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 3909var identifier = (IdentifierNameSyntax)context.Node; 5361var identifier = (IdentifierNameSyntax)context.Node; 6091var x = doc.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 7794var p1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "p1").Single(); 8756var p1s = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "p1").ToArray(); 8759foreach (var p1 in p1s) 9162var p1s = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "p1").ToArray(); 9165foreach (var p1 in p1s)
Semantics\RecordTests.cs (40)
21189var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 21419var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 21430var y = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").First(); 21443var test = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").First(); 21484var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21530var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21586var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 21589foreach (var x in xs) 21645var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 21648var x = xs[0]; 21734var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 21737var x = xs[1]; 21933var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21970var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 22010var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 22045var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 22124var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 24688var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 24723var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 24757var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 24792var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 26390var identifier = (IdentifierNameSyntax)context.Node; 28232var x = doc.DescendantNodes().OfType<IdentifierNameSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Features (183)
AddImport\CSharpAddImportFeatureService.cs (2)
416var namePiece = IdentifierName(part); 543NameSyntax nameSyntax, IdentifierNameSyntax alias)
BraceCompletion\LessAndGreaterThanBraceCompletionService.cs (2)
60if (previousToken.Parent is not IdentifierNameSyntax identifier) 65static async ValueTask<bool> IsSemanticTypeArgumentAsync(Document document, int position, IdentifierNameSyntax identifier, CancellationToken cancellationToken)
ChangeSignature\CSharpChangeSignatureService.cs (2)
819var identifier = nameAttribute.DescendantNodes(descendIntoTrivia: true).OfType<IdentifierNameSyntax>().FirstOrDefault();
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
54var id = IdentifierName(diagnosticId);
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (2)
302foreach (var id in localFunction.DescendantNodes().OfType<IdentifierNameSyntax>())
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (4)
31: AbstractInlineTemporaryCodeRefactoringProvider<IdentifierNameSyntax, VariableDeclaratorSyntax> 97private static bool HasConflict(IdentifierNameSyntax identifier, VariableDeclaratorSyntax variableDeclarator) 260private static async Task<ImmutableArray<IdentifierNameSyntax>> FindReferenceAnnotatedNodesAsync(Document document, CancellationToken cancellationToken) 263return root.GetAnnotatedNodesAndTokens(ReferenceAnnotation).Select(n => (IdentifierNameSyntax)n.AsNode()).ToImmutableArray();
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.ReferenceRewriter.cs (12)
17private readonly ISet<IdentifierNameSyntax> _conflictReferences; 18private readonly ISet<IdentifierNameSyntax> _nonConflictReferences; 23ISet<IdentifierNameSyntax> conflictReferences, 24ISet<IdentifierNameSyntax> nonConflictReferences, 34private ExpressionSyntax UpdateIdentifier(IdentifierNameSyntax node) 47public override SyntaxNode? VisitIdentifierName(IdentifierNameSyntax node) 58node.Expression is IdentifierNameSyntax identifier && 80ShouldAddTupleMemberName(node, out var identifier) && 90private bool ShouldAddTupleMemberName(ArgumentSyntax node, [NotNullWhen(true)] out IdentifierNameSyntax? identifier) 93node.Expression is IdentifierNameSyntax id && 107ISet<IdentifierNameSyntax> conflictReferences, 108ISet<IdentifierNameSyntax> nonConflictReferences,
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
419var namePiece = IdentifierName(part); 432var namePiece = IdentifierName(part);
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (25)
199ImmutableArray<IdentifierNameSyntax> namesOpt) 303private static (PatternSyntax ContainingPattern, ImmutableArray<IdentifierNameSyntax> NamesOpt)? TryFindVariableDesignation( 308using var _ = ArrayBuilder<IdentifierNameSyntax>.GetInstance(out var names); 309if (GetInnermostReceiver(rightReceiver, names, model) is not IdentifierNameSyntax identifierName) 380private static SubpatternSyntax CreateSubpattern(ImmutableArray<IdentifierNameSyntax> names, PatternSyntax pattern) 400private static SubpatternSyntax Subpattern(IdentifierNameSyntax name, PatternSyntax pattern) 416private static (ExpressionSyntax CommonReceiver, ImmutableArray<IdentifierNameSyntax> LeftNames, ImmutableArray<IdentifierNameSyntax> RightNames)? TryGetCommonReceiver( 423using var _1 = ArrayBuilder<IdentifierNameSyntax>.GetInstance(out var leftNames); 424using var _2 = ArrayBuilder<IdentifierNameSyntax>.GetInstance(out var rightNames); 436var lastName = SkipCommonNames(leftNames, rightNames); 461return (commonReceiver ?? ThisExpression(), ImmutableArray<IdentifierNameSyntax>.Empty, rightNames.ToImmutable()); 469return (commonReceiver ?? ThisExpression(), leftNames.ToImmutable(), ImmutableArray<IdentifierNameSyntax>.Empty); 478static bool TryGetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, [NotNullWhen(true)] out ExpressionSyntax? receiver, SemanticModel model) 484static IdentifierNameSyntax? SkipCommonNames(ArrayBuilder<IdentifierNameSyntax> leftNames, ArrayBuilder<IdentifierNameSyntax> rightNames) 486IdentifierNameSyntax? lastName = null; 515private static ExpressionSyntax? GetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, SemanticModel model) 519static bool CanConvertToSubpattern(IdentifierNameSyntax name, SemanticModel model) 532Func<IdentifierNameSyntax, TArg, bool> canConvertToSubpattern, 533ArrayBuilder<IdentifierNameSyntax>? builder = null) 542case IdentifierNameSyntax name 550case MemberBindingExpressionSyntax { Name: IdentifierNameSyntax name } 557case MemberAccessExpressionSyntax(SimpleMemberAccessExpression) { Name: IdentifierNameSyntax name } memberAccess
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
172&& invocation.Expression is IdentifierNameSyntax identifier)
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
181.OfType<IdentifierNameSyntax>()
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
59if (typeSyntax is IdentifierNameSyntax identifierName &&
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
110else if (expression is IdentifierNameSyntax identifier)
Completion\KeywordRecommenders\InKeywordRecommender.cs (1)
133joinClause.Type is IdentifierNameSyntax joinIdentifier &&
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
106token.Parent is IdentifierNameSyntax identifier && identifier.Identifier == token &&
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (1)
96if (token.Parent is IdentifierNameSyntax && token.HasMatchingText(SyntaxKind.WhereKeyword))
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
23IdentifierNameSyntax,
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (2)
60if (binaryExpression.Left is IdentifierNameSyntax identifierName && 108return operand is IdentifierNameSyntax identifierName &&
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (1)
193lambdaBody is IdentifierNameSyntax identifier &&
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (1)
65if (_modifyingExpression is IdentifierNameSyntax identifierName &&
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
661if (lastSelectExpression is IdentifierNameSyntax identifierName &&
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (3)
134async Task<MultiDictionary<IParameterSymbol, IdentifierNameSyntax>> GetParameterReferencesAsync() 136var result = new MultiDictionary<IParameterSymbol, IdentifierNameSyntax>(); 159if (referenceLocation.Location.FindNode(findInsideTrivia: true, getInnermostNodeForTie: true, cancellationToken) is not IdentifierNameSyntax identifierName)
ConvertTupleToStruct\CSharpConvertTupleToStructCodeRefactoringProvider.cs (2)
20IdentifierNameSyntax, 45var newName = SyntaxFactory.IdentifierName(name).WithTriviaFrom(nameColon.Name);
Diagnostics\Analyzers\CSharpPreferFrameworkTypeDiagnosticAnalyzer.cs (2)
19IdentifierNameSyntax, 32protected override bool IsIdentifierNameReplaceableWithFrameworkType(SemanticModel semanticModel, IdentifierNameSyntax node)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (2)
121usingDirective.Name?.GetRightmostName() is IdentifierNameSyntax identifierName) 193public override void VisitIdentifierName(IdentifierNameSyntax node)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (4)
152var hasUsingSystem = usings.Any(u => u.Name is IdentifierNameSyntax { Identifier.ValueText: nameof(System) }); 209catchClause.Declaration.Type is IdentifierNameSyntax { Identifier.ValueText: nameof(Exception) }) 216Left: IdentifierNameSyntax { Identifier.ValueText: nameof(System) }, 217Right: IdentifierNameSyntax { Identifier.ValueText: nameof(Exception) },
DocumentHighlighting\CSharpDocumentHighlightsService.cs (1)
55foreach (var type in descendants.OfType<IdentifierNameSyntax>())
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
199let nameSyntax = (IdentifierNameSyntax)node
GenerateConstructors\CSharpGenerateConstructorsCodeRefactoringProvider.cs (1)
78if (body is IdentifierNameSyntax identifierName)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (3)
37=> node is IdentifierNameSyntax identifierName && !IsProbablySyntacticConstruct(identifierName.Identifier); 201var node = identifierToken.Parent as IdentifierNameSyntax;
IntroduceParameter\CSharpIntroduceParameterCodeRefactoringProvider.cs (1)
19IdentifierNameSyntax,
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (2)
44var newLocalName = IdentifierName(newLocalNameToken); 95IdentifierNameSyntax newLocalName,
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (1)
34var newLocalName = SyntaxFactory.IdentifierName(newLocalNameToken);
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
72IdentifierNameSyntax identifierName => identifierName.Identifier.ValueText,
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (4)
295public override SyntaxNode VisitIdentifierName(IdentifierNameSyntax node) 364if (nameToken.Parent is not IdentifierNameSyntax nameNode) 371var newName = nameNode; 392private static bool IsInvocationName(IdentifierNameSyntax nameNode, ExpressionSyntax invocationExpression)
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (2)
33AbstractReplacePropertyWithMethodsService<IdentifierNameSyntax, ExpressionSyntax, NameMemberCrefSyntax, StatementSyntax, PropertyDeclarationSyntax> 297protected override NameMemberCrefSyntax? TryGetCrefSyntax(IdentifierNameSyntax identifierName)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
260=> expr.WalkDownParentheses() is IdentifierNameSyntax identifier &&
Snippets\CSharpForEachLoopSnippetProvider.cs (2)
47token is { RawKind: (int)SyntaxKind.IdentifierToken, ValueText: "await", Parent: IdentifierNameSyntax { Parent: ExpressionStatementSyntax } }) 63var varIdentifier = IdentifierName("var");
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
90if (argumentExpression is not IdentifierNameSyntax identifierName) 387if (descendentNode is IdentifierNameSyntax identifierName)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (8)
153if (invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression && 239var invocationName = invocationExpression.Expression switch 241IdentifierNameSyntax identifier => identifier, 244Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) }, 245Expression: IdentifierNameSyntax identifier 253var conditionName = condition.Left is IdentifierNameSyntax leftIdentifier 255: (IdentifierNameSyntax)condition.Right;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
66if (typeSyntax is IdentifierNameSyntax identifierName &&
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
103if (argument.Expression is not IdentifierNameSyntax argumentIdentifier)
src\Analyzers\CSharp\Analyzers\RemoveUnusedMembers\CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
20IdentifierNameSyntax,
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (4)
74Left: IdentifierNameSyntax leftIdentifier, 113Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Enumerable.Where) }, 155Expression: IdentifierNameSyntax castIdentifier, 161Name: IdentifierNameSyntax
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (3)
28IdentifierNameSyntax> 235Right: IdentifierNameSyntax { Identifier.ValueText: "value" } 268if (descendant is IdentifierNameSyntax identifierName)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (2)
214foreach (var identifierName in statement.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>())
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (8)
104if (topMostExpression.Parent is CastExpressionSyntax castExpression && castExpression.Type is IdentifierNameSyntax) 552foreach (var identifier in containingBlock.DescendantNodes().OfType<IdentifierNameSyntax>()) 809Expression: IdentifierNameSyntax { Identifier.ValueText: var elementName }, 831if (assignmentExpression.Right.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Any( 1106if (memberAccess.Name is not IdentifierNameSyntax { Identifier.ValueText: EmptyName }) 1171if (name is IdentifierNameSyntax) 1174if (name is MemberAccessExpressionSyntax { Expression: ExpressionSyntax childName, Name: IdentifierNameSyntax } &&
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
252foreach (var identifierName in searchScope.DescendantNodes().OfType<IdentifierNameSyntax>())
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
255if (descendentNode is IdentifierNameSyntax identifierName) 373var identifierName = (IdentifierNameSyntax)assignment.Left;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
374if (descendentNode is IdentifierNameSyntax identifierName &&
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (7)
178if (descendentNode is IdentifierNameSyntax identifierName) 216if (descendentNode is IdentifierNameSyntax identifierName && ! 237if (descendentNode is IdentifierNameSyntax identifierName && 281var identifier = (IdentifierNameSyntax)operand; 298assignment.Left is not IdentifierNameSyntax identifier) 318IdentifierNameSyntax identifier,
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (4)
479var leftIdentifier = assignmentExpression.Left switch 481IdentifierNameSyntax identifierName => identifierName, 482MemberAccessExpressionSyntax(kind: SyntaxKind.SimpleMemberAccessExpression) { Expression: (kind: SyntaxKind.ThisExpression), Name: IdentifierNameSyntax identifierName } => identifierName, 512operation is IParameterReferenceOperation { Syntax: IdentifierNameSyntax parameterName } parameterReference)
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
101if (secondAssignmentExprTemp is not IdentifierNameSyntax { Identifier: var secondAssignmentExprTempIdentifier })
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
106Contract.ThrowIfFalse(_assignmentTarget is IdentifierNameSyntax); 117identifier: ((IdentifierNameSyntax)_assignmentTarget).Identifier,
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (2)
72if (left is not IdentifierNameSyntax and not MemberAccessExpressionSyntax) 127: (IdentifierNameSyntax)left;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
44if (constraint.Type is not IdentifierNameSyntax { Identifier.IsMissing: true } type)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
23=> node is IdentifierNameSyntax;
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
39=> node is IdentifierNameSyntax;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
118if (type is IdentifierNameSyntax)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (6)
78private static (VariableDeclaratorSyntax declarator, IdentifierNameSyntax identifier, SyntaxNode invocationOrCreation) FindDiagnosticNodes( 87var identifier = (IdentifierNameSyntax)identifierLocation.FindNode(cancellationToken); 98IdentifierNameSyntax identifier, SyntaxNode currentNode, 281SourceText sourceText, IdentifierNameSyntax identifier, 339IdentifierNameSyntax identifier,
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
88invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression 131invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (2)
67if (referenceNode is not IdentifierNameSyntax identifierNode) 137if (referenceNode is IdentifierNameSyntax identifierNode)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
223if (argument.NameColon?.Name is IdentifierNameSyntax { Identifier: var identifier })
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
50var identifierName = (IdentifierNameSyntax)node; 125newNameNode is IdentifierNameSyntax { Identifier.ValueText: AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName } &&
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseImplicitTypeCodeFixProvider.cs (1)
50var implicitType = SyntaxFactory.IdentifierName("var")
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
105if (invocation.Expression is IdentifierNameSyntax)
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndMemberAccessCodeFixProvider.cs (1)
98if (whenNotNull is MemberBindingExpressionSyntax { Name: IdentifierNameSyntax identifierName })
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
585if (location.Location.FindNode(findInsideTrivia: true, getInnermostNodeForTie: true, cancellationToken) is not IdentifierNameSyntax identifier)
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
137if (reference.Location.FindNode(cancellationToken) is not IdentifierNameSyntax node)
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
223var selectorIdentifier = ((IdentifierNameSyntax)selectOrGroupExpression).Identifier;
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (2)
68var propertyIdentifierName = IdentifierName(property.Identifier.WithoutTrivia()); 71.Select(loc => loc.Location.FindNode(getInnermostNodeForTie: true, cancellationToken) as IdentifierNameSyntax)
UseAutoProperty\UseAutoPropertyRewriter.cs (6)
15IdentifierNameSyntax propertyIdentifierName, 16ISet<IdentifierNameSyntax> identifierNames) : CSharpSyntaxRewriter 18private readonly IdentifierNameSyntax _propertyIdentifierName = propertyIdentifierName; 19private readonly ISet<IdentifierNameSyntax> _identifierNames = identifierNames; 23if (node.Name is IdentifierNameSyntax identifierName && 41public override SyntaxNode? VisitIdentifierName(IdentifierNameSyntax node)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
230var localReference = SyntaxFactory.IdentifierName(localName);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (12)
IOperation\IOperationTests_IBoundDiscardOperation.cs (1)
35VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IDelegateCreationExpression.cs (5)
423VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics); 490VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics); 549VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, @" 559VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, @" 638VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IEventAssignmentExpression.cs (1)
99VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IFieldReferenceExpression.cs (2)
202VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics); 399VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IPropertyReferenceExpression.cs (1)
356VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_ITupleExpression.cs (1)
893VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IUsingStatement.cs (1)
1367VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (458)
Semantics\AccessCheckTests.cs (1)
761var discards = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken).ToArray();
Semantics\BindingTests.cs (25)
2722var identifierNameM0 = tree 2725.OfType<IdentifierNameSyntax>() 2734var identifierNameM1 = tree 2737.OfType<IdentifierNameSyntax>() 2781.OfType<IdentifierNameSyntax>() 2833var identifierNameM0 = tree 2836.OfType<IdentifierNameSyntax>() 2845var identifierNameM1 = tree 2848.OfType<IdentifierNameSyntax>() 3037var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3051var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3117var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3131var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3190var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3205var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3275var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3290var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3380var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "MathMin").Single().Parent; 3732var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "E").Single().Parent; 3912var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "G").First(); 3985var ids = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().ToArray(); 3987var id = ids[1]; 4026var ids = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().ToArray(); 4028var id = ids[1];
Semantics\ColorColorTests.cs (10)
592var expr = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(tree)); 1892var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single(); 1949var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single(); 2006var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single(); 2055var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single();
Semantics\DeconstructionTests.cs (1)
4171var refs = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>();
Semantics\DelegateTypeTests.cs (1)
11092var identifiers = nodes.OfType<InvocationExpressionSyntax>().Where(i => i.Expression is IdentifierNameSyntax id && id.Identifier.Text == "Report").Select(i => i.ArgumentList.Arguments[0].Expression).ToArray();
Semantics\DynamicTests.cs (183)
3860var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3893var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3921var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3949var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 4000var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 4976var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5059node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5100var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5182node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5223var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5306node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5341var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5382var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5426var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5470var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5514var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5578var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 5616var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 5655var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "e").Single(); 5691var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5732var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5777var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5822var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5867var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5935var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 5974var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6022var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6104node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6145var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6227node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6265var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6347node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6377var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6419var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6466var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6510var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6552var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6606var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6671var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6736node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6780var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6845node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6890var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6956node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6991var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7059var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7118node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7162var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7230node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7275var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7346node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7391var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7463node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7504var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7581var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7642node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7686var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7748node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7792var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7854node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7895var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7967var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8029node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8073var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8135node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8178var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8239node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8283var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8348node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8392var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8457node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8501var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8566node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8611var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8677node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8724var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8793var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8861var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 10009var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10014node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10092node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10137var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10142node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10220node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10265var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10270node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10348node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10419var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10424node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10500node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10553var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10558node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10647node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10701var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10706node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10797node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10971var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").First(); 10976node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 11063node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 11100var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 11184var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 11262var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 11317var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11370var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11450var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11494var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11535var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11584var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11636var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11680var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single();
Semantics\ExpressionBodiedMemberTests.cs (8)
122var info = GetSemanticInfoForTest<IdentifierNameSyntax>(comp); 132var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(@" 149var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(@" 167var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(@" 224var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(comp); 257var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(comp); 280var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(comp); 313var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(comp);
Semantics\GlobalUsingDirectiveTests.cs (1)
4975var alias1 = SyntaxFactory.IdentifierName("alias1");
Semantics\ImplicitObjectCreationTests.cs (2)
4574var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "aParameter").Single();
Semantics\InitOnlyMemberTests.cs (2)
3152var p = 3155.OfType<IdentifierNameSyntax>()
Semantics\InterceptorsTests.cs (2)
2094var node1 = root.DescendantNodes().First(node => node is IdentifierNameSyntax name && name.Identifier.Text == "Prop"); 2100var node3 = root.DescendantNodes().Last(node => node is IdentifierNameSyntax name && name.Identifier.Text == "Program");
Semantics\LambdaDiscardParametersTests.cs (6)
422var underscore = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(p => p.ToString() == "_").Single(); 448var underscores = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(p => p.ToString() == "_").ToArray(); 482var underscore = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(p => p.ToString() == "_").Single(); 513var underscores = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(p => p.ToString() == "_").ToArray();
Semantics\LambdaTests.cs (49)
1513var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1548var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1582var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1614var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 2121var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2167var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2213var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2259var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2305var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2335var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2362var eReference = lambda.Body.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 2417var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2463var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2509var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2542var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2575var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2612var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2997ExpressionSyntax contentType = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ContentType").Single(); 3004ExpressionSyntax b = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b").Single(); 3039ExpressionSyntax contentType = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ContentType").Single(); 3046ExpressionSyntax b = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b").Single(); 3977var a = (IdentifierNameSyntax)tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single().Name; 3990a = (IdentifierNameSyntax)newTree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single().Name; 6509var parameterUsages = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>() 6514var parameterUsage = parameterUsages[index]; 6819var discard = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>() 6848var underscore = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>() 7011var action = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.ValueText == "Action");
Semantics\LocalFunctionTests.cs (33)
353var x = newTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 394var a = tree.GetRoot().DescendantNodes() 395.OfType<IdentifierNameSyntax>().ElementAt(2); 409a = newTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().ElementAt(2); 1767var a = root.DescendantNodes() 1768.OfType<IdentifierNameSyntax>() 1785var clsCompliant = root.DescendantNodes() 1786.OfType<IdentifierNameSyntax>() 1842var a = root.DescendantNodes() 1843.OfType<IdentifierNameSyntax>() 1860var clsCompliant = root.DescendantNodes() 1861.OfType<IdentifierNameSyntax>() 4694var refs = descendents.OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == name).ToArray(); 4735var refs = descendents.OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == name).ToArray(); 4962var b2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b2").Single(); 4965var b1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b1").Single(); 7381static IdentifierNameSyntax getTParameter(CSharpSyntaxNode node) 7383return node.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "TParameter").Single(); 7451return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == identifier).Single().SpanStart; 7458=> SyntaxFactory.ParseCompilationUnit($@"{source};", options: parseOptions).DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 7639var tParameterUsages = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>() 7644var tParameterUsage = tParameterUsages[index]; 8684var parameterUsages = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>() 8689var parameterUsage = parameterUsages[index]; 8962static IdentifierNameSyntax getParameter(CSharpSyntaxNode node) 8964return node.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "parameter").Single(); 9552var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>() 10172var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>()
Semantics\MethodTypeInferenceTests.cs (14)
703foreach (var discardOut in GetDiscardIdentifiers(tree)) 758foreach (var discardOut in GetDiscardIdentifiers(tree)) 804foreach (var discardOut in GetDiscardIdentifiers(tree)) 849private static void CheckDiscard(SemanticModel model, IdentifierNameSyntax discard, string type) 862private static IEnumerable<IdentifierNameSyntax> GetDiscardIdentifiers(SyntaxTree tree) 864return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken); 1119var book = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "b").Parent; 1160var author = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "a").Parent; 1201var bookResult = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "bookResult").Parent; 1205var authorResult = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "authorResult").Parent;
Semantics\NamedAndOptionalTests.cs (1)
811var nodeAndModel = GetBindingNodeAndModel<IdentifierNameSyntax>(comp);
Semantics\NameOfTests.cs (4)
1018.Where(e => e.Expression is IdentifierNameSyntax { Identifier.ValueText: "nameof" }) 1092.Where(e => e.Expression is IdentifierNameSyntax { Identifier.ValueText: "nameof" }) 1175.Where(e => e.Expression is IdentifierNameSyntax { Identifier.ValueText: "nameof" }) 1256.Where(e => e.Expression is IdentifierNameSyntax { Identifier.ValueText: "nameof" })
Semantics\NullableReferenceTypesTests.cs (4)
3336var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 161245var identifiers = unreachableArm.DescendantNodes().OfType<IdentifierNameSyntax>().ToImmutableArray(); 161291var identifiers = unreachableSection.DescendantNodes().OfType<IdentifierNameSyntax>().ToImmutableArray();
Semantics\OperatorTests.cs (4)
7056var syntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 7211var syntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last();
Semantics\QueryTests.cs (4)
2234var e = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf("x+1", StringComparison.Ordinal)).Parent; 2240e = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf("w+1", StringComparison.Ordinal)).Parent; 4417VerifyOperationTreeAndDiagnosticsForTest<IdentifierNameSyntax>(source, expectedOperationTree, expectedDiagnostics);
Semantics\RecordStructTests.cs (12)
2594var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2629var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2663var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2698var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 3243var x = doc.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 6060var identifier = (IdentifierNameSyntax)context.Node;
Semantics\ScriptSemanticsTests.cs (4)
1313var x = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 1342x = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 1357x = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
Semantics\SuppressAccessibilityChecksTests.cs (2)
227var p = 230.OfType<IdentifierNameSyntax>()
Semantics\TopLevelStatementsTests.cs (85)
194var localRef = unit1.DescendantNodes().OfType<IdentifierNameSyntax>().First(); 319var localRef = unit1.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 492var localFuncRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single(); 500var localRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").Single(); 540var localRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").ToArray(); 543foreach (var localRef in localRefs) 584var localFuncRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single(); 591var localRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").Single(); 699var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "s").Single(); 873Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single()).Symbol); 879Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single()).Symbol); 987Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").First()).Symbol); 991Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Skip(1).Single()).Symbol); 1042Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single()).Symbol); 1407var nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 1425nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 1520var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "c").Single(); 1592foreach (var id in tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>()) 1598foreach (var id in tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>()) 1706var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 1708var nameRef = nameRefs[1]; 1759void verifyModel(ISymbol declSymbol, SemanticModel model, IdentifierNameSyntax nameRef) 1882var nameRefs = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 1884var nameRef = nameRefs[0]; 1927void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2100var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 2102var nameRef = nameRefs[0]; 2140void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2266var nameRefs = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 2268var nameRef = nameRefs[0]; 2306void verifyModel(ISymbol declSymbol, SemanticModel model2, IdentifierNameSyntax nameRef) 2446var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 2448var nameRef = nameRefs[0]; 2503void verifyModel(SemanticModel model2, IdentifierNameSyntax nameRef) 2919var nameRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias1" && !id.Parent.IsKind(SyntaxKind.NameEquals)).Single(); 2924nameRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias2").Single(); 2941nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias2" && !id.Parent.IsKind(SyntaxKind.NameEquals)).Single(); 2946nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias1").Single(); 3941var nameRefs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").ToArray(); 3943var nameRef = nameRefs[0]; 3999void verifyModel(ISymbol declSymbol, SemanticModel model, IdentifierNameSyntax nameRef) 4090var nameRefs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").ToArray(); 4092var nameRef = nameRefs[0]; 4129void verifyModel(SemanticModel model, IdentifierNameSyntax nameRef) 4216var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single(); 4512Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol); 4518Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol); 4576Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").First()).Symbol); 4580Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Skip(1).Single()).Symbol); 4625Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single()).Symbol); 4894var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single(); 4952Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single()).Symbol); 4959Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single()).Symbol); 4979var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single(); 6034var localRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").ToArray(); 6037foreach (var localRef in localRefs) 6277var localRef = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 6317var localRef = syntaxTree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 6368var localRef = syntaxTree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 8651var id = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 8673var id = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ar").Single(); 8695var id = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ar").Single(); 9677var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.Text == "var");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (355)
Compilation\GetImportScopesTests.cs (17)
149Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } })); 150Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } })); 176Assert.True(scopes.Single().Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 199Assert.True(scopes[0].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }); 201Assert.True(scopes[1].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 227Assert.True(scopes[0].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }); 229Assert.True(scopes[1].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 338Assert.True(scopes.Single().Aliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } })); 339Assert.True(scopes.Single().Aliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } })); 365Assert.True(scopes.Single().Aliases.Single().DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 388Assert.True(scopes[0].Aliases.Single().DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }); 390Assert.True(scopes[1].Aliases.Single().DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 626Assert.True(scopes.Single().Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 683Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } })); 685Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: QualifiedNameSyntax { Right: IdentifierNameSyntax { Identifier.Text: nameof(System.IO) } } })); 689Assert.True(scopes.Single().Aliases.Any(i => i.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } })); 691Assert.True(scopes.Single().Aliases.Any(i => i.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: QualifiedNameSyntax { Right: IdentifierNameSyntax { Identifier.Text: nameof(System.Threading) } } }));
Compilation\GetSemanticInfoBrokenCodeTests.cs (4)
202foreach (var identifierSyntax in tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>()) 300var identifierSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(n => n.Identifier.ValueText == "CompletionItem");
Compilation\GetSemanticInfoTests.cs (4)
1674var varIdentifier = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().DescendantNodes().First(n => n.ToString() == "var"); 4355var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(id => id.Identifier.ValueText == "b");
Compilation\SemanticModelAPITests.cs (30)
202var rx = root.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 234var rx = root.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 1338var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<NameEqualsSyntax>().Single().Name; 1744var typeSyntax = (IdentifierNameSyntax)fieldDecl.Declaration.Type; 3127var syntax = tree.GetRoot().DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single(). 3128Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single(); 3742var identifier = (IdentifierNameSyntax)memberAccess.Expression; 4611var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(ident => ident.Identifier.Text == "global").Single(); 4625var nodes = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(ident => ident.Identifier.Text == "global").ToArray(); 4644var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "M"); 4661var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "M2"); 4676var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "M2"); 4692var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "NotNullWhen"); 4708var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "M2"); 4727var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "M2"); 4743var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(i => i.Identifier.Text == "M2"); 4758var identifier = tree.GetRoot().DescendantNodes(descendIntoTrivia: true).OfType<IdentifierNameSyntax>().First();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (10)
3669IdentifierNameSyntax x = methodDecl.Body.Statements[0].Declaration.Variables[0].Initializer.Value.Body; 3866var node = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "Alias").Last().Parent; 4294var aliasSymbol = speculativeModel.GetAliasInfo(attr3.Name as IdentifierNameSyntax); 4340aliasSymbol = speculativeModel.GetAliasInfo(attr6.Name as IdentifierNameSyntax); 4363aliasSymbol = speculativeModel.GetAliasInfo(attr7.Name as IdentifierNameSyntax); 4385aliasSymbol = speculativeModel.GetAliasInfo(attr8.Name as IdentifierNameSyntax); 5206var node = tree.GetRoot().DescendantNodes().Single(node => node is IdentifierNameSyntax { Identifier: { ValueText: "b" } }); 5357.First(s => s.Left is IdentifierNameSyntax { Identifier.Text: "Thing" }) 5543.First(s => s.Left is IdentifierNameSyntax { Identifier.Text: "Thing" })
Compilation\SemanticModelGetSemanticInfoTests.cs (153)
3015var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4369var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4402var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4440var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4471var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4501var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4519var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4541var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4566var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4604var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4848var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4875var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 4916var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5066var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5150var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5238var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5317var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5355var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5380var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5401var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5441var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5539var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(compilation); 5792var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5859var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5928var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 5995var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6326var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6395var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6433var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6516var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6551var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6588var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6640var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6872var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 6917var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7046var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7103var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7551var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7584var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7622var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7659var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7695var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7724var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7775var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7794var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7817var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7882var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 7948var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8017var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode, 8034var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8070var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode, 8087var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8121var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8145var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8170var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8195var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8216var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8238var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8300var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8332var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(csSource); 8348var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8555var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8600var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8682var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode, parseOptions: TestOptions.Regular6); 8848var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 8890var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9060var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9308var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9355var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9414var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9567var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9611var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9666var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9717var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9777var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9828var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9883var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 9984var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10056var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10100var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10174var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10279var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10348var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10382var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10430var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10463var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10597var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10634var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10671var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10710var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10753var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10879var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 10958var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11137var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11187var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11263var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11300var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11337var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11377var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11424var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11534var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11569var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11636var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11670var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11707var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11757var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11828var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11898var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 11970var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12104var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12151var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12218var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12286var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12354var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12390var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12452var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12523var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12569var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12607var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode, parseOptions: TestOptions.Regular6); 12641var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode, parseOptions: TestOptions.Regular6); 12768var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12800var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12843var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12919var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12955var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 12993var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13034var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13066var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13095var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13227var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13260var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13500var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13870var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13909var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13948var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 13975var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14002var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14041var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14078var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14200var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14290var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14417var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14506var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14594var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14657var argumentNameSyntax = argumentSyntax.NameColon.Name; 14663var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 14738IdentifierNameSyntax syntaxToBind = GetSyntaxNodeOfTypeForBinding<IdentifierNameSyntax>(GetSyntaxNodeList(tree)); 15180var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 15211var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 15242var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode); 15304var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(comp); 15335var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode);
Compilation\SemanticModelGetSemanticInfoTests_LateBound.cs (1)
417var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(sourceCode);
DocumentationComments\CrefTests.cs (7)
6046var typeParameterSyntax = crefSyntax.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 6070var methodNameSyntax = crefSyntax.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 6216var alias = model.GetAliasInfo(crefSyntax.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single()); 6244var parameterSyntax = crefSyntax. 6246DescendantNodes().OfType<IdentifierNameSyntax>().Single();
DocumentationComments\ParameterTests.cs (3)
327var nameSyntax = GetNameAttributeValues(compilation).Single(); 350var nameSyntax = GetNameAttributeValues(compilation).Single(); 837private static IEnumerable<IdentifierNameSyntax> GetNameAttributeValues(CSharpCompilation compilation)
SymbolDisplay\SymbolDisplayTests.cs (2)
9024var preprocessingNameSyntax = tree.GetRoot().DescendantNodes(descendIntoTrivia: true) 9025.OfType<IdentifierNameSyntax>().First();
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (2)
1013var identifierSyntax = (IdentifierNameSyntax)memberAccessSyntax.Expression;
Symbols\AnonymousTypesSemanticsTests.cs (2)
2014var node = (IdentifierNameSyntax)current;
Symbols\CheckedUserDefinedOperatorsTests.cs (20)
7210var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7211var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7282var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7283var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7353var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7354var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7426var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7427var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7490var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7491var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single();
Symbols\ExtensionMethodTests.cs (8)
3866var instance = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Instance").First(); 3913var instance = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Instance").First(); 3958var instance = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Instance").First(); 4008var instance = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Instance").First();
Symbols\GenericConstraintTests.cs (4)
7393var nest = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Nest").Single(); 7418var nest = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Nest").Single();
Symbols\ImplicitClassTests.cs (3)
73IEnumerable<IdentifierNameSyntax> identifiers = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>(); 74var toStringIdentifier = identifiers.Where(node => node.Identifier.ValueText.Equals("ToString")).Single();
Symbols\Metadata\MetadataTypeTests.cs (3)
372var id = newTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(s => s.ToString() == "StaticModClass").First(); 387id = newTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(s => s.ToString() == "StaticModClass").First();
Symbols\PartialPropertiesTests.cs (1)
4831var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.ToString() == "X").Last();
Symbols\Source\ExternAliasTests.cs (1)
360var qualifier = left.Alias;
Symbols\Source\FileModifierTests.cs (2)
3977var methodNameSyntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single();
Symbols\Source\LocalTests.cs (5)
33var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(compilation); 87var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(compilation); 112var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(compilation); 137var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(compilation); 160var semanticInfo = GetSemanticInfoForTest<IdentifierNameSyntax>(compilation);
Symbols\Source\NullablePublicAPITests.cs (32)
1372var newReference = (IdentifierNameSyntax)SyntaxFactory.ParseExpression(@"s1"); 1517var newReference = (IdentifierNameSyntax)SyntaxFactory.ParseExpression(@"s1"); 1573var newReference = (IdentifierNameSyntax)SyntaxFactory.ParseExpression(@"Prop"); 2629var sRef = root.DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "s").Single(); 2663var select = root.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Select").Single(); 2701var select = root.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Select").Single(); 3495var o1Ref = lambda.DescendantNodes() 3499.OfType<IdentifierNameSyntax>() 3549var o1Ref = innerLambda.DescendantNodes() 3553.OfType<IdentifierNameSyntax>() 3560var o2Ref = innerLambda.DescendantNodes() 3564.OfType<IdentifierNameSyntax>() 3610var o1Ref = innerLambda.DescendantNodes() 3614.OfType<IdentifierNameSyntax>() 3621var o2Ref = innerLambda.DescendantNodes() 3625.OfType<IdentifierNameSyntax>() 3667var o2Reference = localFunction.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "o2"); 3770var o1Ref = lambda.DescendantNodes() 3774.OfType<IdentifierNameSyntax>() 3863var innerO2Reference = innerLambda.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "o2"); 3915var o1Reference = fieldLambda.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "o1"); 3929var o3Reference = propertyLambda.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "o3");
Symbols\Source\UsingAliasTests.cs (24)
50var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 72var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 110var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 132var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 167var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 187var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 225var alias1 = model.GetAliasInfo((IdentifierNameSyntax)base1); 245var alias4 = model.GetAliasInfo((IdentifierNameSyntax)base4); 545IdentifierNameSyntax exprSyntaxToBind = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(syntaxTree)); 565IdentifierNameSyntax exprSyntaxToBind = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(syntaxTree)); 584IdentifierNameSyntax exprSyntaxToBind = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(syntaxTree)); 604IdentifierNameSyntax exprSyntaxToBind = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(syntaxTree)); 628IdentifierNameSyntax exprSyntaxToBind = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(syntaxTree)); 651IdentifierNameSyntax exprSyntaxToBind = (IdentifierNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(syntaxTree)); 697var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Short").Skip(1).Single(); 740var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Short").Skip(1).Single();
Symbols\SymbolEqualityTests.cs (6)
777var member2Syntax = (IdentifierNameSyntax)root.DescendantNodes().Last(sn => sn.Kind() == SyntaxKind.IdentifierName); 828var member2Syntax = (IdentifierNameSyntax)root.DescendantNodes().Last(sn => sn.Kind() == SyntaxKind.SimpleMemberAccessExpression).DescendantNodes().Last(sn => sn.Kind() == SyntaxKind.IdentifierName); 889var member2Syntax = (IdentifierNameSyntax)root.DescendantNodes().Last(sn => sn.Kind() == SyntaxKind.IdentifierName);
Symbols\SymbolExtensionTests.cs (9)
101var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.Text == "var"); 119var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.Text == "var"); 137var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.Text == "var"); 156var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(id => id.Identifier.Text == "var"); 252var method = model.GetSymbolInfo(tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Method").Single()).Symbol.GetSymbol<MethodSymbol>();
Symbols\TypeTests.cs (2)
1773var tinfo = model.GetTypeInfo(nodes[0] as IdentifierNameSyntax); 1779tinfo = model.GetTypeInfo(nodes[1] as IdentifierNameSyntax);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (113)
Diagnostics\DiagnosticTest.cs (1)
1987.ErrorCodes.OfType<Syntax.IdentifierNameSyntax>().First().Identifier;
Diagnostics\LocationsTests.cs (2)
554var node = SyntaxFactory.IdentifierName(SyntaxFactory.Identifier(SyntaxFactory.TriviaList(SyntaxFactory.Whitespace(" ")), "x", default(SyntaxTriviaList))); 586var nodeWithBadError = SyntaxFactory.IdentifierName(new SyntaxToken(node.Node.WithDiagnosticsGreen(new DiagnosticInfo[] { new SyntaxDiagnosticInfo(10, 10, ErrorCode.ERR_NoBaseClass) })));
Generated\Syntax.Test.xml.Generated.cs (5)
10229private static IdentifierNameSyntax GenerateIdentifierName() 10966var node = GenerateIdentifierName(); 10969var newNode = node.WithIdentifier(node.Identifier); 14099var oldNode = GenerateIdentifierName(); 14115var oldNode = GenerateIdentifierName();
IncrementalParsing\NodeValidators.cs (3)
78Assert.IsType<IdentifierNameSyntax>(nameTree); 79var genericName = nameTree as IdentifierNameSyntax;
LexicalAndXml\PreprocessorTests.cs (1)
345var token = (actualWarningNumber as IdentifierNameSyntax).Identifier;
Parsing\DeclarationParsingTests.cs (2)
4531Assert.Equal(tokenKind, ((IdentifierNameSyntax)bx.Right).Identifier.Kind()); 4587Assert.Equal(tokenKind, ((IdentifierNameSyntax)bx.Right).Identifier.Kind());
Parsing\ExpressionParsingTests.cs (2)
38Assert.True(((IdentifierNameSyntax)expr).Identifier.IsMissing); 433Assert.False(((IdentifierNameSyntax)expr).Identifier.IsMissing);
Parsing\NameParsingTests.cs (3)
37Assert.False(((IdentifierNameSyntax)name).Identifier.IsMissing); 50Assert.False(((IdentifierNameSyntax)name).Identifier.IsMissing); 63Assert.True(((IdentifierNameSyntax)name).Identifier.IsMissing);
Parsing\ParsingErrorRecoveryTests.cs (14)
6655var nm = (IdentifierNameSyntax)oc.Orderings[0].Expression; 6700var nm = (IdentifierNameSyntax)oc.Orderings[0].Expression; 6744var nm = (IdentifierNameSyntax)oc.Orderings[0].Expression; 6748nm = (IdentifierNameSyntax)oc.Orderings[1].Expression; 6794var nm = (IdentifierNameSyntax)oc.Orderings[0].Expression; 6842var nm = (IdentifierNameSyntax)oc.Orderings[0].Expression; 6889var nm = (IdentifierNameSyntax)oc.Orderings[0].Expression; 6893nm = (IdentifierNameSyntax)oc.Orderings[1].Expression;
Parsing\StatementParsingTests.cs (11)
225Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)ds.Declaration.Type).Identifier.Kind()); 330Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)ds.Declaration.Type).Identifier.Kind()); 913Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)fs.Declaration.Type).Identifier.Kind()); 1598Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)fs.Declaration.Type).Identifier.Kind()); 1999Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)fs.Type).Identifier.Kind()); 2468Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)us.Declaration.Type).Identifier.Kind()); 2503Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)us.Declaration.Type).Identifier.Kind()); 2637Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)us.Declaration.Type).Identifier.Kind()); 3350Assert.IsType<IdentifierNameSyntax>(decl.Declaration.Type); 3351var name = (IdentifierNameSyntax)decl.Declaration.Type;
Syntax\StructuredTriviaTests.cs (2)
27Assert.Equal(conditionName, ((IdentifierNameSyntax)structuredTrivia.Condition).Identifier.ValueText); 74var identExpr = SyntaxFactory.IdentifierName(ident);
Syntax\SyntaxNodeTests.cs (19)
85var e = expression.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "e"); 103var e = expression.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "e"); 122var e = expression.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "e"); 516var identifierNodes = expr.DescendantNodes().OfType<IdentifierNameSyntax>().ToList(); 686var name = SyntaxFactory.IdentifierName(identifier); 687var missingName = SyntaxFactory.IdentifierName(missingIdentifier); 735var identifier = root.DescendantNodes(descendIntoTrivia: true).Single(n => n is IdentifierNameSyntax); 1856var externAlias = SyntaxFactory.IdentifierName("alias"); 1857var goo = SyntaxFactory.IdentifierName("Goo"); 1858var bar = SyntaxFactory.IdentifierName("Bar"); 1950var someNode = SyntaxFactory.IdentifierName(someToken); 1987var someNode = SyntaxFactory.IdentifierName(someToken); 3880var a = expression.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 3881var e = expression.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "e");
Syntax\SyntaxRewriterTests.cs (8)
555var expr1 = (IdentifierNameSyntax)exprStmt1.Expression; 572var expr2 = (IdentifierNameSyntax)exprStmt2.Expression; 603var expr1 = (IdentifierNameSyntax)exprStmt1.Expression; 618var expr2 = (IdentifierNameSyntax)exprStmt2.Expression;
Syntax\TrackNodeTests.cs (40)
24var a = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 26var currentA = trackedExpr.GetCurrentNode(a); 35var a = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 47var a = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 48var currentA = expr.GetCurrentNode(a); 56var a = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 66var originalA = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 68var currentA = trackedExpr.GetCurrentNode(originalA); 69var newA = currentA.WithLeadingTrivia(SyntaxFactory.Comment("/* ayup */")); 71var latestA = replacedExpr.GetCurrentNode(originalA); 81var originalA = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 83var currentA = trackedExpr.GetCurrentNode(originalA); 84var newA = currentA.WithLeadingTrivia(SyntaxFactory.Comment("/* ayup */")); 97var originalA = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 99var currentA = trackedExpr.GetCurrentNode(originalA); 101var latestA = replacedExpr.GetCurrentNode(originalA); 109var originalA = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 111var currentA = trackedExpr.GetCurrentNode(originalA); 122var originalA = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 124var currentA = trackedExpr.GetCurrentNode(originalA); 126var replacedExpr = trackedExpr.ReplaceNodes(trackedExpr.DescendantNodes().OfType<IdentifierNameSyntax>(), (original, changed) => currentA); 134var originalA = expr.DescendantNodes().OfType<IdentifierNameSyntax>().First(n => n.Identifier.Text == "a"); 136var currentA = trackedExpr.GetCurrentNode(originalA); 138var replacedExpr = trackedExpr.ReplaceNodes(trackedExpr.DescendantNodes().OfType<IdentifierNameSyntax>(), (original, changed) => currentA); 149var ids = expr.DescendantNodes().OfType<IdentifierNameSyntax>().ToList(); 154foreach (var id in ids) 156var currentId = trackedExpr.GetCurrentNode(id); 167var ids = expr.DescendantNodes().OfType<IdentifierNameSyntax>().ToList(); 173foreach (var id in ids) 175var currentId = trackedExpr.GetCurrentNode(id);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
CompilationTestUtils.cs (4)
291if (node is IdentifierNameSyntax identifier) 333if (node is IdentifierNameSyntax) 335summary.Alias = semanticModel.GetSpeculativeAliasInfo(position, (IdentifierNameSyntax)node, bindingOption); 543case IdentifierNameSyntax id when id.Parent is MemberAccessExpressionSyntax memberAccess && memberAccess.Name == node:
SemanticModelTestBase.cs (4)
141var nameSyntaxToBind = tree.GetRoot().FindToken(position, findInsideTrivia: true).Parent as IdentifierNameSyntax; 156IdentifierNameSyntax syntaxToBind = GetSyntaxNodeOfTypeForBinding<IdentifierNameSyntax>(GetSyntaxNodeList(tree));
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
CodeGen\WinRTCollectionTests.cs (1)
7424var add = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Add").Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (94)
Classification\ClassificationHelpers.cs (5)
265else if (token.Parent is IdentifierNameSyntax identifierNameSyntax && IsNamespaceName(identifierNameSyntax)) 294private static bool IsNamespaceName(IdentifierNameSyntax identifierSyntax) 474if (token.Parent is IdentifierNameSyntax && token.Parent?.Parent is ExpressionStatementSyntax) 482token.Parent is IdentifierNameSyntax && 489return token.Parent is IdentifierNameSyntax
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (2)
18public override ImmutableArray<Type> SyntaxNodeTypes { get; } = [typeof(DiscardDesignationSyntax), typeof(DiscardPatternSyntax), typeof(ParameterSyntax), typeof(IdentifierNameSyntax)]; 46case IdentifierNameSyntax identifierName when identifierName.Identifier.Text == "_":
Classification\SyntaxClassification\NameSyntaxClassifier.cs (5)
38typeof(IdentifierNameSyntax), 134name is IdentifierNameSyntax) 158if (name is IdentifierNameSyntax { Identifier.Text: "args" } && 287if (name is IdentifierNameSyntax && 323name is IdentifierNameSyntax { Identifier.Text: "async" or "nameof" or "partial" })
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
62if (identifier.Parent is not IdentifierNameSyntax identifierName)
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (1)
44var token = usingDirective.Alias.Name;
Classification\Worker_Preprocesser.cs (1)
123else if (node is IdentifierNameSyntax identifier)
CodeGeneration\CSharpSyntaxGenerator.cs (4)
34private static readonly IdentifierNameSyntax s_nameOfIdentifier = 908var id = (IdentifierNameSyntax)node; 3605SyntaxFactory.NameEquals((IdentifierNameSyntax)identifier),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (3)
38IdentifierNameSyntax> 485protected override SyntaxToken GetIdentifier(IdentifierNameSyntax node) 703case IdentifierNameSyntax identifierNameNode:
ReassignedVariable\CSharpReassignedVariableService.cs (1)
20IdentifierNameSyntax>
Recommendations\CSharpRecommendationServiceRunner.cs (6)
282private RecommendedSymbols GetSymbolsOffOfAlias(IdentifierNameSyntax alias) 467if (argument.Expression is IdentifierNameSyntax { Identifier.ValueText: var argumentIdentifier } && 484if (variableDeclarator.Initializer?.Value is IdentifierNameSyntax { Identifier.ValueText: var fieldInitializerIdentifier } && 491else if (member is PropertyDeclarationSyntax { Initializer.Value: IdentifierNameSyntax { Identifier.ValueText: var propertyInitializerIdentifier } } && 587if (originalExpression is IdentifierNameSyntax identifier) 706if (expression is not IdentifierNameSyntax identifier)
Rename\CSharpRenameRewriterLanguageService.cs (2)
604if (parsedIdentifier is IdentifierNameSyntax identifierName) 1128valueText = ((IdentifierNameSyntax)name).Identifier.ValueText;
Simplification\CSharpSimplificationService.Expander.cs (4)
428public override SyntaxNode VisitIdentifierName(IdentifierNameSyntax node) 520var identifierReplacement = (IdentifierNameSyntax)replacement; 751((IdentifierNameSyntax)newNode).Identifier,
Simplification\Reducers\CSharpExtensionMethodReducer.cs (1)
86(IdentifierNameSyntax)invocationExpressionNodeExpression.WithoutLeadingTrivia());
Simplification\Reducers\CSharpNameReducer.Rewriter.cs (1)
96public override SyntaxNode VisitIdentifierName(IdentifierNameSyntax node)
Simplification\Reducers\CSharpVarReducer.Rewriter.cs (1)
55public override SyntaxNode VisitIdentifierName(IdentifierNameSyntax node) => ProcessTypeSyntax(node);
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (5)
121var aliasIdentifier = SyntaxFactory.IdentifierName(aliasName); 134semanticModel.GetAliasInfo((IdentifierNameSyntax)node, cancellationToken) != null) 282var aliasIdentifier = SyntaxFactory.IdentifierName(aliasName); 384return invocationExpr.Expression is IdentifierNameSyntax identifierName && 405if (simplifiedNode is IdentifierNameSyntax identifierName &&
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
167if (memberAccess.Name.Identifier.ValueText == ((IdentifierNameSyntax)replacementNode).Identifier.ValueText)
Simplification\Simplifiers\NameSimplifier.cs (1)
334var identifier = ((IdentifierNameSyntax)name).Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (3)
422=> expression is IdentifierNameSyntax { Parent: NameColonSyntax }; 428if (invocation?.Expression is IdentifierNameSyntax name && 655return invocation.Expression is IdentifierNameSyntax identifierName &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (3)
89var nx = (IdentifierNameSyntax)expression; 364if (current is IdentifierNameSyntax identifierName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (2)
19return typeSyntax is IdentifierNameSyntax && 20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
354if (errorCode is not IdentifierNameSyntax identifierName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (3)
340case IdentifierNameSyntax { Parent: PrimaryConstructorBaseTypeSyntax baseType }: 350if (node is IdentifierNameSyntax { IsVar: true }) 401IdentifierNameSyntax nameSyntax when IsInPreprocessingSymbolContext(nameSyntax) => CreatePreprocessingSymbol(semanticModel, nameSyntax.Identifier),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (4)
629=> (node as IdentifierNameSyntax).IsAttributeNamedArgumentIdentifier(); 654if (node is IdentifierNameSyntax identifier && 829var identifier = ((IdentifierNameSyntax)node).Identifier; 1576=> node is AssignmentExpressionSyntax(SyntaxKind.SimpleAssignmentExpression) { Left: IdentifierNameSyntax };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (5)
40(IdentifierNameSyntax identifierX, IdentifierNameSyntax identifierY) => _tokenComparer.Compare(identifierX.Identifier, identifierY.Identifier), 42(IdentifierNameSyntax identifierX, GenericNameSyntax genericY) => 46(GenericNameSyntax genericX, IdentifierNameSyntax identifierY) => 97result.Add((IdentifierNameSyntax)name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (4)
255var originalIdentifierNodes = originalLambdaBody.DescendantNodes().OfType<IdentifierNameSyntax>().Where(node => paramNames.Contains(node.Identifier.ValueText)); 261var replacedIdentifierNodes = replacedLambdaBody.DescendantNodes().OfType<IdentifierNameSyntax>().Where(node => paramNames.Contains(node.Identifier.ValueText)); 273IEnumerable<IdentifierNameSyntax> originalIdentifierNodes, 274IEnumerable<IdentifierNameSyntax> replacedIdentifierNodes,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
103var candidateReplacementNode = SyntaxFactory.IdentifierName("var"); 281.Where(n => n is IdentifierNameSyntax id && id.Identifier.ValueText.Equals(identifier.ValueText))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
306var name = IdentifierName(names[i]); 309result = AliasQualifiedName((IdentifierNameSyntax)result, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
698=> token.Parent is IdentifierNameSyntax typedParent &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (7)
1112else if (token.IsKind(SyntaxKind.IdentifierToken) && token.Text == "scoped" && token.Parent is IdentifierNameSyntax scopedIdentifierName) 1269else if (token.IsKind(SyntaxKind.IdentifierToken) && token.Text == "scoped" && token.Parent is IdentifierNameSyntax scopedIdentifierName && scopedIdentifierName.Parent.IsKind(SyntaxKind.Parameter)) 1506if (patternSyntax is ConstantPatternSyntax { Expression: CastExpressionSyntax { Expression: IdentifierNameSyntax } castExpression } && 1655@foreach.Type is IdentifierNameSyntax identifierName && 1695if (invocation.Expression is IdentifierNameSyntax identifierName && 2151gotoStatement.Expression is IdentifierNameSyntax && 2152((IdentifierNameSyntax)gotoStatement.Expression).Identifier == token &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (1)
87var syntax = AddInformationTo(symbol.Name.ToIdentifierName(), symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (3)
112var typeSyntax = IdentifierName("dynamic"); 221private static IdentifierNameSyntax CreateGlobalIdentifier() 320var syntax = AddInformationTo(symbol.Name.ToIdentifierName(), symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
31return ((IdentifierNameSyntax)nameSyntax).Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
57public static IdentifierNameSyntax ToIdentifierName(this string identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
84var replacementNode = IdentifierName(discardToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
1823if (node is IdentifierNameSyntax identifierName) 2214foreach (var descendant in container.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>()) 2314else if (expr is IdentifierNameSyntax name)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
121if (node is IdentifierNameSyntax { Parent: not NameColonSyntax } identifierName &&
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
240VerifySyntax<IdentifierNameSyntax>(Generator.IdentifierName("x"), "x");
Microsoft.CodeAnalysis.UnitTests (7)
CommonSyntaxTests.cs (7)
186var node = CSharp.SyntaxFactory.IdentifierName("a"); 210var exprB = expr.DescendantNodes().OfType<CSharp.Syntax.IdentifierNameSyntax>().First(n => n.Identifier.ToString() == "b"); 222var trackedB = trackedExpr.GetCurrentNodes(exprB).First(); 231var exprB = expr.DescendantNodes().OfType<CSharp.Syntax.IdentifierNameSyntax>().First(n => n.Identifier.ToString() == "b"); 245var trackedB = trackedExpr.GetCurrentNodes(exprB).First();
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Simplifier\SimplifierTests.cs (2)
35var node = SyntaxFactory.IdentifierName(SyntaxFactory.Identifier("Test")); 46var node = SyntaxFactory.IdentifierName(SyntaxFactory.Identifier("Test"));
SyntaxPathTests.cs (2)
21var node = SyntaxFactory.IdentifierName(SyntaxFactory.Identifier("Hi")); 31var node = SyntaxFactory.IdentifierName(SyntaxFactory.Identifier("Hi"));
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
93if (attr.Name is IdentifierNameSyntax id)
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
93if (attr.Name is IdentifierNameSyntax id)
Microsoft.Gen.Logging (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
93if (attr.Name is IdentifierNameSyntax id)
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
93if (attr.Name is IdentifierNameSyntax id)
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
93if (attr.Name is IdentifierNameSyntax id)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Marshaling\BaseJSGenerator.cs (3)
66protected static IdentifierNameSyntax MarshalerTypeName(MarshalerType marshalerType) 71protected static IdentifierNameSyntax GetToManagedMethod(MarshalerType marshalerType) 82protected static IdentifierNameSyntax GetToJSMethod(MarshalerType marshalerType)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
294if (referenceNode is not IdentifierNameSyntax identifierNode)
Microsoft.Maui.Controls.BindingSourceGen (3)
BindingSourceGenerator.cs (1)
202 else if (lambdaBodyExpression is IdentifierNameSyntax identifier)
InvocationParser.cs (1)
48 if (firstArgument is IdentifierNameSyntax)
PathParser.cs (1)
22 IdentifierNameSyntax _ => Result<List<IPathPart>>.Success(new List<IPathPart>()),
Microsoft.ML.AutoML (1)
Utils\Entity.cs (1)
135if (exp is IdentifierNameSyntax i)
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (4)
726var oldIdentifierName = (IdentifierNameSyntax)oldName; 727var newIdentifierName = (IdentifierNameSyntax)newName;
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (1)
37builder.Append(((IdentifierNameSyntax)name).Identifier.ValueText);
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
208return TryGenerateNameRef((IdentifierNameSyntax)expression); 516private bool TryGenerateNameRef(IdentifierNameSyntax identifierName)
LanguageService\CSharpHelpContextService.cs (1)
412if (token.Parent is IdentifierNameSyntax { Parent: TypeConstraintSyntax { Parent: TypeParameterConstraintClauseSyntax } })
System.Private.CoreLib.Generators (4)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (4)
200if (memberAccessExpression.Name is IdentifierNameSyntax identifierName && identifierName.Identifier.Text == "IsSupported") 211private static INamedTypeSymbol? GetIsSupportedTypeSymbol(SemanticModel model, IdentifierNameSyntax identifierName) 238else if (expressionToDecompose is IdentifierNameSyntax identifier) 315if (expressionToDecompose is MemberAccessExpressionSyntax || expressionToDecompose is IdentifierNameSyntax)
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (1)
123IdentifierNameSyntax // For: ApplicationConfiguration.Initialize() with a using statement
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
54} or IdentifierNameSyntax // For: EnumValidator.Validate(..) with a using statement