1858 references to ValueText
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\BinderInvocation.cs (1)
42Name.Identifier.ValueText: string memberName,
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
98 methodName = method.Identifier.ValueText;
Microsoft.AspNetCore.App.Analyzers (12)
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (1)
74var expectedValueText = token.ValueText;
Infrastructure\VirtualChars\IVirtualCharService.cs (2)
30/// char of the tokens <see cref="SyntaxToken.ValueText"/>. In other words, for each char 59/// token's <see cref="SyntaxToken.ValueText"/>.
Kestrel\ListenOnIPv6AnyAnalyzer.cs (3)
34Name: IdentifierNameSyntax { Identifier.ValueText: "Listen" } 65Name: IdentifierNameSyntax { Identifier.ValueText: "Any" } 90Name.Identifier.ValueText: "Any"
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
421builder.Add(identifer.ValueText); 441builder.Add(identifer.ValueText);
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (2)
412var name = argument.NameColon.Name.Identifier.ValueText; 492var name = argument.NameColon.Name.Identifier.ValueText;
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (1)
315var name = argument.NameColon.Name.Identifier.ValueText;
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
38&& classDeclaration is { Identifier.ValueText: "Program" }
Microsoft.AspNetCore.App.Analyzers.Test (7)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (7)
155routePattern = RoutePatternFactory.Parse(token.ValueText); 160AttributeRouteModel.ReplaceTokens(token.ValueText, new Dictionary<string, string> 174throw new Exception($"Parsing '{token.ValueText}' throws RoutePattern error '{ex.Message}'. No diagnostics.", ex); 186$"Parsing '{token.ValueText}' throws RoutePattern error '{ex.Message}'. Error not found in diagnostics: " + Environment.NewLine + 198Assert.Fail($"Parsing '{token.ValueText}' didn't throw an error for expected diagnostics: \r\n" + expectedDiagnostics.ToString().Replace(@"""", @"""""")); 228throw new Exception($"Parsing '{token.ValueText}' has route parameter '{parsedRoutePattern.Name}' mismatch.", ex); 235$"Parsing '{token.ValueText}' has mismatched parameter counts.");
Microsoft.AspNetCore.App.CodeFixes (1)
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
116(!isIdentifierToken || pair.Key.ExtensionMethod.Contains(token.ValueText));
Microsoft.AspNetCore.Components.Analyzers (3)
ComponentParameterAnalyzer.cs (3)
175return identifierUsedInGetter.Identifier.ValueText == identifierUsedInSetter?.Identifier.ValueText; 207right.Identifier.ValueText == "value")
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
StaticRouteHandlerModel\Endpoint.cs (1)
177return identifier.ValueText;
StaticRouteHandlerModel\InvocationOperationExtensions.cs (1)
75if (node is InvocationExpressionSyntax { Expression: MemberAccessExpressionSyntax { Name: { Identifier: { ValueText: var method } } } })
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
1349return root.DescendantTokens().Any(static token => string.Equals(token.ValueText, "GeneratedCode", StringComparison.Ordinal) || 1350string.Equals(token.ValueText, nameof(GeneratedCodeAttribute), StringComparison.Ordinal));
Microsoft.CodeAnalysis.CodeStyle (14)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
240if (!fieldNames.Contains(identifier.ValueText)) 512if (!fieldNames.Contains(syntaxFacts.GetIdentifierOfIdentifierName(identifierName).ValueText))
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (4)
142var conditionIdentifier = syntaxFacts.GetIdentifierOfIdentifierName(checkedExpression).ValueText; 161var variableName = syntaxFacts.GetIdentifierOfVariableDeclarator(declarator).ValueText; 179syntaxFacts.GetIdentifierOfIdentifierName(identifier).ValueText == localSymbol.Name) 212var leftName = syntaxFacts.GetIdentifierOfIdentifierName(left).ValueText;
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (3)
84seenNames.Add(this.SyntaxFacts.GetIdentifierOfIdentifierName(name).ValueText); 164if (!seenNames.Add(identifier.ValueText)) 168statement, leftMemberAccess, rightExpression, typeMember?.Name ?? identifier.ValueText));
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
165&& syntaxFacts.GetIdentifierOfSimpleName(nameOfMemberAccessExpression).ValueText 173return syntaxFacts.GetIdentifierOfSimpleName(expression).ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
78var expectedValueText = token.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\IVirtualCharService.cs (2)
30/// char of the tokens <see cref="SyntaxToken.ValueText"/>. In other words, for each char 59/// token's <see cref="SyntaxToken.ValueText"/>.
Microsoft.CodeAnalysis.CodeStyle.Fixes (14)
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (2)
45name: _state.IdentifierToken.ValueText, 58CodeFixesResources.Generate_enum_member_0, _state.IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
61var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
144if (string.IsNullOrWhiteSpace(IdentifierToken.ValueText))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
54var name = state.IdentifierToken.ValueText;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
82.GetMembers(IdentifierToken.ValueText)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (3)
81name: _state.IdentifierToken.ValueText, 99name: _state.IdentifierToken.ValueText); 193_state.IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
129if (state.IdentifierToken.ValueText.StartsWith("_"))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
144var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText) 245if (string.IsNullOrWhiteSpace(identifierToken.ValueText)) 437name: IdentifierToken.ValueText, cancellationToken: cancellationToken);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
941_usedNames.Add(nameToken.ValueText);
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder.QueryTranslationState.cs (1)
74string name = identifier.ValueText;
Binder\Binder_AnonymousTypes.cs (1)
72fieldName = nameToken.ValueText;
Binder\Binder_Symbols.cs (2)
195var identifierValueText = identifier.ValueText; 701name = nameToken.ValueText;
Binder\LocalScopeBinder.cs (2)
384if (LocalsMap != null && LocalsMap.TryGetValue(nameToken.ValueText, out result)) 404if (LocalFunctionsMap != null && LocalFunctionsMap.TryGetValue(nameToken.ValueText, out result))
Symbols\AliasSymbol.cs (1)
75return new AliasSymbolFromResolvedTarget(targetSymbol, aliasToken.ValueText, containingSymbol, ImmutableArray.Create(aliasToken.GetLocation()), isExtern);
Symbols\Source\AttributeLocation.cs (3)
108var result = ToAttributeLocation(token.ValueText); 111var kind = SyntaxFacts.GetKeywordKind(token.ValueText); 114kind = SyntaxFacts.GetContextualKeywordKind(token.ValueText);
Symbols\Source\SourceCustomEventSymbol.cs (2)
36_name = ExplicitInterfaceHelpers.GetMemberNameAndInterfaceSymbol(binder, interfaceSpecifier, nameToken.ValueText, diagnostics, out _explicitInterfaceType, out aliasQualifierOpt); 40var explicitlyImplementedEvent = this.FindExplicitlyImplementedEvent(_explicitInterfaceType, nameToken.ValueText, interfaceSpecifier, diagnostics);
Symbols\Source\SourceLabelSymbol.cs (1)
62return tk.ValueText;
Symbols\Source\SourceLocalSymbol.cs (1)
271return _identifierToken.ValueText;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
217diagnostics.Add(ErrorCode.ERR_StaticConstant, errorLocation, firstIdentifier.ValueText);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
677string identifierValueText = identifier.ValueText;
Symbols\Source\SourceParameterSymbol.cs (1)
46var name = identifier.ValueText;
Symbols\Source\SourcePropertySymbol.cs (1)
633diagnostics.Add(ErrorCode.WRN_DefaultValueForUnconsumedLocation, paramNameToken.GetLocation(), paramNameToken.ValueText);
Syntax\SyntaxFactory.cs (2)
1207return Token(rewrittenToken.LeadingTrivia, SyntaxKind.LessThanToken, "{", rewrittenToken.ValueText, rewrittenToken.TrailingTrivia); 1210return Token(rewrittenToken.LeadingTrivia, SyntaxKind.GreaterThanToken, "}", rewrittenToken.ValueText, rewrittenToken.TrailingTrivia);
Syntax\SyntaxFacts.cs (1)
497return nameToken.RawKind != 0 ? nameToken.ValueText : null;
Microsoft.CodeAnalysis.CSharp.CodeStyle (95)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (3)
60methodDeclaration.Identifier.ValueText != WellKnownMemberNames.EntryPointMethodName || 69if (mainTypeName != null && containingTypeDeclaration.Identifier.ValueText != mainTypeName) 73if (methodDeclaration.ParameterList.Parameters is [{ Identifier.ValueText: not "args" }])
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
118if (identifierName.Identifier.ValueText == "_") 394if (identifierName.Identifier.ValueText == variableName)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (6)
154if (invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression && 243Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) }, 256if (!Equals(conditionName.Identifier.ValueText, invocationName.Identifier.ValueText)) 289if (!Equals(declarator.Identifier.ValueText, conditionName.Identifier.ValueText))
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
74if (typeSymbol.GetMembers(identifierName.Identifier.ValueText).Any())
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (3)
110if (parameter.Identifier.ValueText != argumentIdentifier.Identifier.ValueText) 337Expression: MemberAccessExpressionSyntax { Name.Identifier.ValueText: nameof(Task.ConfigureAwait), Expression: var underlying }
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (2)
108var rightmostName = expression.GetRightmostName()?.Identifier.ValueText; 235Right: IdentifierNameSyntax { Identifier.ValueText: "value" }
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (6)
116if (memberAccessExpression.Name.Identifier.ValueText is not CreateBuilderName and not GetInstanceName) 119if (memberAccessExpression.Name.Identifier.ValueText == GetInstanceName && 120memberAccessExpression.Expression is not GenericNameSyntax { Identifier.ValueText: nameof(ArrayBuilder<int>) }) 216if (identifierName.Identifier.ValueText == identifier.ValueText && 220memberAccess.Name.Identifier.ValueText
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
278if (memberAccess.Name.Identifier.ValueText == AsSpanName && !copiedData) 406var name = memberAccess.Name.Identifier.ValueText;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (5)
546if (identifier.Identifier.ValueText != local.Name) 779Identifier.ValueText: var variableName, 801Expression: IdentifierNameSyntax { Identifier.ValueText: var elementName }, 1098if (memberAccess.Name is not IdentifierNameSyntax { Identifier.ValueText: EmptyName }) 1124Identifier.ValueText: EmptyName,
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
176if (current is not MemberAccessExpressionSyntax(SyntaxKind.SimpleMemberAccessExpression) { Name.Identifier.ValueText: "Length" or "Count" } memberAccess)
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
254if (identifierName.Identifier.ValueText == localName)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (4)
257if (identifierName.Identifier.ValueText == local.Name && 281memberAccessExpression.Name.Identifier.ValueText == WellKnownMemberNames.DelegateInvokeName) 374if (variableDeclarator.Identifier.ValueText == identifierName.Identifier.ValueText)
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (2)
64var attributeName = attribute.Name.GetRightmostName()?.Identifier.ValueText; 137if (parameter.Identifier.ValueText == stringValue)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
335identifierName.Identifier.ValueText == variableName &&
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (4)
190if (identifierName.Identifier.ValueText == asOperand?.Name && 198if (identifierName.Identifier.ValueText == localSymbol.Name) 227identifierName.Identifier.ValueText == localSymbol.Name && 247identifierName.Identifier.ValueText == localSymbol.Name &&
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (3)
213var variableName = variable.Identifier.ValueText; 224declarator.Identifier.ValueText.Equals(variableName)) 229designation.Identifier.ValueText.Equals(variableName))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
490if (namedType.GetMembers(leftIdentifier.Identifier.ValueText).IsEmpty)
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (2)
104if (variableDeclarator.Identifier.ValueText != secondAssignmentExprTempIdentifier.ValueText)
src\Analyzers\CSharp\Analyzers\ValidateFormatString\CSharpValidateFormatStringDiagnosticAnalyzer.cs (1)
27if (argument.NameColon != null && argument.NameColon.Name.Identifier.ValueText.Equals(searchArgumentName))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
65var name = argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
50var name = argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
166parts.Add(simpleName.Identifier.ValueText);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
45return typeParameters.HasValue && typeParameters.Value.Any(typeParameter => typeParameter.Identifier.ValueText == name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
34var identifier = syntaxToken.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (11)
67name = max.Name.Identifier.ValueText; 73name = qn.Right.Identifier.ValueText; 79name = aq.Name.Identifier.ValueText; 85name = gx.Identifier.ValueText; 91name = nx.Identifier.ValueText; 366return identifierName.Identifier.ValueText.ToCamelCase(); 370return memberAccess.Name.Identifier.ValueText.ToCamelCase(); 374return memberBinding.Name.Identifier.ValueText.ToCamelCase(); 391return name.Identifier.ValueText.ToCamelCase(); 396var word = foreachStatement.Identifier.ValueText.ToCamelCase(); 433return argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
67var simpleNameText = token.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (2)
359if (identifierName.Identifier.ValueText.Equals(FormattingDiagnosticIds.FormatDocumentControlDiagnosticId) 360|| identifierName.Identifier.ValueText.Equals(FormattingDiagnosticIds.FormattingDiagnosticId))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (3)
154@using.Alias.Name.Identifier.ValueText.AppendToAliasNameSet(builder); 285var type = model.Compilation.TryGetCallingConventionSymbol(syntax.Name.ValueText); 408=> model.Compilation.CreatePreprocessingSymbol(identifier.ValueText);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (6)
550name = simpleName.Identifier.ValueText; 888builder.Append(typeParameterList.Parameters[0].Identifier.ValueText); 892builder.Append(typeParameterList.Parameters[i].Identifier.ValueText); 1145=> (argument as ArgumentSyntax)?.NameColon?.Name.Identifier.ValueText ?? string.Empty; 1148=> (argument as AttributeArgumentSyntax)?.NameEquals?.Name.Identifier.ValueText ?? string.Empty; 1428xmlElement.StartTag.Name.LocalName.ValueText == DocumentationCommentXmlNames.ParameterElementName;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\CSharpInferredMemberNameSimplifier.cs (4)
32if (inferredName == null || inferredName != node.NameColon.Name.Identifier.ValueText) 53if (inferredName == null || inferredName != node.NameEquals.Name.Identifier.ValueText) 66var name = toRemove.NameColon.Name.Identifier.ValueText; 88var name = toRemove.NameEquals.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (5)
221paramNames.Add(originalParam.Identifier.ValueText); 245paramNames = [originalSimpleLambda.Parameter.Identifier.ValueText]; 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)); 669=> argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (4)
27var token1IsSystem = x.ValueText == nameof(System); 28var token2IsSystem = y.ValueText == nameof(System); 55var string1 = x.ValueText; 56var string2 = y.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
301.Where(n => n is IdentifierNameSyntax id && id.Identifier.ValueText.Equals(identifier.ValueText))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
86var name1 = using1.Name.GetFirstToken().ValueText; 87var name2 = using2.Name.GetFirstToken().ValueText;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (44)
src\Analyzers\CSharp\CodeFixes\AddAnonymousTypeMemberName\CSharpAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
42=> initializer.Initializers.Where(i => i.NameEquals != null).Select(i => i.NameEquals!.Name.Identifier.ValueText);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
630element.StartTag?.Name.LocalName.ValueText == DocumentationCommentXmlNames.SummaryElementName); 779element.StartTag?.Name.LocalName.ValueText == DocumentationCommentXmlNames.SummaryElementName);
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (2)
38=> attribute.Identifier.Identifier.ValueText; 57=> element.StartTag.Name.LocalName.ValueText;
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
30if (identifierToken.ValueText != string.Empty &&
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
91invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression 138invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
55if (newName.ValueText == AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName && 73return newName.ValueText == AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName 125newNameNode is IdentifierNameSyntax { Identifier.ValueText: AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName } &&
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
311var name = argumentNameColon.Name.Identifier.ValueText;
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
229if (!properties.Values.Any(v => v == current.Identifier.ValueText)) 546if (xmlElement is { Name.LocalName.ValueText: "see" })
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (3)
51element = node is XmlElementSyntax { StartTag.Name.LocalName.ValueText: var elementName } xmlElement && elementName == name 152var constructorContents = typeStructure.Content.Any(n => n is XmlElementSyntax { StartTag.Name.LocalName.ValueText: s_summaryTagName }) 206existingParamNodeNames.Add(nameAttribute.Identifier.Identifier.ValueText);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
135return Literal(token.LeadingTrivia, tokenText, token.ValueText, token.TrailingTrivia); 144return Literal(token.LeadingTrivia, tokenText, token.ValueText, token.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
397comparisonResult = string.Compare(x.ValueText, y.ValueText, StringComparison.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
126if (numericLiteral.Token.ValueText == "1")
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1656identifierName.Identifier.ValueText == "var") 1696identifierName.Identifier.ValueText == "var")
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (2)
103return argument.NameColon.Name.Identifier.ValueText; 116return argument.NameEquals.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
82valueText: discardSyntax.UnderscoreToken.ValueText,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (12)
714var name = argumentOpt != null && argumentOpt.NameColon != null ? argumentOpt.NameColon.Name.Identifier.ValueText : null; 747var name = argumentOpt != null && argumentOpt.NameColon != null ? argumentOpt.NameColon.Name.Identifier.ValueText : null; 1556elementNamesBuilder.Add(subPattern.NameColon?.Name.Identifier.ValueText); 1629.Where(p => p.Name == memberDeclarator.NameEquals.Name.Identifier.ValueText) 1800parameter.Identifier.ValueText, lambdaExpression.Body); 1809if (identifierName.Identifier.ValueText.Equals(parameterName) && 2204if (descendant.Identifier.ValueText != symbol.Name) 2230parenthesizedVariableDesignation.Variables.All(v => v is SingleVariableDesignationSyntax { Identifier.ValueText: not "" })) 2232var elementNames = parenthesizedVariableDesignation.Variables.SelectAsArray(v => ((SingleVariableDesignationSyntax)v).Identifier.ValueText); 2300elementNamesBuilder.Add(name.Identifier.ValueText == "" ? null : 2301name.Identifier.ValueText); 2330var name = singleVariable.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (5)
23if (SyntaxFacts.GetKeywordKind(syntaxToken.ValueText) == SyntaxKind.None && SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.None) 28if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken) 42syntaxToken.ValueText == "global") 52syntaxToken.ValueText,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
245Assert.Equal(type.Identifier.ValueText, typeName);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (4)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (3)
133if (token.ValueText == "") 163JToken.Parse(token.ValueText); 175JsonDocument.Parse(token.ValueText, new JsonDocumentOptions { AllowTrailingCommas = false, CommentHandling = JsonCommentHandling.Disallow });
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
146regex = new Regex(token.ValueText, options);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (38)
CodeGen\CodeGenDeconstructTests.cs (17)
3580Assert.Equal(decl.Identifier.ValueText, symbol.Name); 3583Assert.Same(symbol, model.LookupSymbols(decl.SpanStart, name: decl.Identifier.ValueText).Single()); 3584Assert.True(model.LookupNames(decl.SpanStart).Contains(decl.Identifier.ValueText)); 3603Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: decl.Identifier.ValueText).Single()); 3604Assert.True(model.LookupNames(reference.SpanStart).Contains(decl.Identifier.ValueText)); 3612Assert.Equal(decl.Identifier.ValueText, field.Name); 3615Assert.Same(field, model.LookupSymbols(decl.SpanStart, name: decl.Identifier.ValueText).Single()); 3617Assert.True(model.LookupNames(decl.SpanStart).Contains(decl.Identifier.ValueText)); 3622Assert.Same(field, model.LookupSymbols(reference.SpanStart, name: decl.Identifier.ValueText).Single()); 3623Assert.True(model.LookupNames(reference.SpanStart).Contains(decl.Identifier.ValueText)); 3635return tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == name).Single(); 3662return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name); 5472var firstX1 = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "x1").Single(); 5504var firstY = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == "y").First(); 5509var secondY = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == "y").ElementAt(1); 5535var firstX = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == "x").First(); 5540var secondX = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == "x").ElementAt(1);
CodeGen\CodeGenInterpolatedString.cs (3)
40Assert.Equal("@$\"", token1.ValueText); 44Assert.Equal("$@\"", token2.ValueText); 49Assert.False(string.IsNullOrEmpty(token.ValueText));
CodeGen\CodeGenOperators.cs (3)
5409ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single())); 5699ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single())); 5735ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single()));
CodeGen\CodeGenTupleTest.cs (15)
4024var result = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "result").Single(); 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 (346)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
9655var syntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(n => n.Identifier.ValueText == "OnBehaviorAttached");
Diagnostics\DiagnosticAnalyzerTests.cs (2)
56if (id.Identifier.ValueText.StartsWith("x", StringComparison.Ordinal)) 58context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_CA9999_UseOfVariableThatStartsWithX, id.Location, id.Identifier.ValueText));
RefStructInterfacesTests.cs (59)
6628var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 6765var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 6881var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 7013var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 7142var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 7472var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 7662var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 7881var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 8075var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8268var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8441var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8547var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8931var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9135var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9331var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9499var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9714var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 9935var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10150var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10347var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10442var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10542var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 10739var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 10979var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 11198var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 11422var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 12148var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 12416var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 12661var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 12924var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 13191var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 13453var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 14151var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 14492var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 14854var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 15205var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 15553var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 15732var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 15987var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 16758var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16823var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16888var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16972var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17060var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17153var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17250var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17334var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17655var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17852var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 18075var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 18275var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18476var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18652var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18760var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 19128var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19299var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19472var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19624var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19966var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single();
Semantics\InlineArrayTests.cs (12)
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 (32)
833return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name); 1156Assert.False(model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Any()); 1157Assert.False(model.LookupNames(reference.SpanStart).Contains(reference.Identifier.ValueText)); 1166Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single()); 1167Assert.True(model.LookupNames(reference.SpanStart).Contains(reference.Identifier.ValueText)); 1197Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single()); 1198Assert.True(model.LookupNames(reference.SpanStart).Contains(reference.Identifier.ValueText)); 9702var d = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 10269var d = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 21370var e = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "e").Single(); 22719Assert.False(model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Any()); 22720Assert.DoesNotContain(reference.Identifier.ValueText, model.LookupNames(reference.SpanStart)); 32232var b = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single()); 32272var b = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single()); 32312var a = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "a").Single()); 32385var bDecl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single(); 33694var z1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "z1").First(); 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(); 35668var identifierAfter = statementAfter.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "G"); 36323var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test3").Last(); 36416Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single())); 36498Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single())); 36571Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
Semantics\ParamsCollectionTests.cs (7)
3596var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 3886var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 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(); 9072var parameterDecl = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Where(p => p.Identifier.ValueText == "paramsParameter").Single();
Semantics\PatternMatchingTestBase.cs (31)
27return GetPatternDeclarations(tree).Where(d => d.Identifier.ValueText == v); 42return GetVariableDeclarations(tree).Where(d => d.Identifier.ValueText == v); 62return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name); 82Assert.Equal(designation.Identifier.ValueText, symbol.Name); 87var other = model.LookupSymbols(designation.SpanStart, name: designation.Identifier.ValueText).Single(); 97Assert.True(model.LookupNames(designation.SpanStart).Contains(designation.Identifier.ValueText)); 126Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: designation.Identifier.ValueText).Single()); 127Assert.True(model.LookupNames(reference.SpanStart).Contains(designation.Identifier.ValueText)); 143Assert.Equal(designation.Identifier.ValueText, symbol.Name); 147Assert.NotEqual(symbol, model.LookupSymbols(designation.SpanStart, name: designation.Identifier.ValueText).Single()); 148Assert.True(model.LookupNames(designation.SpanStart).Contains(designation.Identifier.ValueText)); 169Assert.Equal(declarator.Identifier.ValueText, symbol.Name); 173Assert.NotEqual(symbol, model.LookupSymbols(declarator.SpanStart, name: declarator.Identifier.ValueText).Single()); 174Assert.True(model.LookupNames(declarator.SpanStart).Contains(declarator.Identifier.ValueText)); 183Assert.Equal(designation.Identifier.ValueText, symbol.Name); 187Assert.NotEqual(symbol, model.LookupSymbols(designation.SpanStart, name: designation.Identifier.ValueText).Single()); 188Assert.True(model.LookupNames(designation.SpanStart).Contains(designation.Identifier.ValueText)); 197Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single()); 198Assert.True(model.LookupNames(reference.SpanStart).Contains(reference.Identifier.ValueText)); 210var other = model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single(); 212Assert.True(model.LookupNames(reference.SpanStart).Contains(reference.Identifier.ValueText)); 218Assert.False(model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Any()); 219Assert.False(model.LookupNames(reference.SpanStart).Contains(reference.Identifier.ValueText)); 245Assert.Equal(designation.Identifier.ValueText, symbol.Name); 250var symbols = model.LookupSymbols(designation.SpanStart, name: designation.Identifier.ValueText); 263Assert.Contains(designation.Identifier.ValueText, names); 302symbols = model.LookupSymbols(reference.SpanStart, name: designation.Identifier.ValueText); 318Assert.True(model.LookupNames(reference.SpanStart).Contains(designation.Identifier.ValueText)); 376var identifierText = designation.Identifier.ValueText; 420Assert.False(model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Any()); 421Assert.DoesNotContain(reference.Identifier.ValueText, model.LookupNames(reference.SpanStart));
Semantics\PatternMatchingTests.cs (29)
849var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 1432var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 1433var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1482var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 1483var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1591var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 1592var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1656var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 1657var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 1662var x2Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x2").ToArray(); 1663var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").ToArray(); 1668var x3Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x3").ToArray(); 1669var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").ToArray(); 1739var x2Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x2").ToArray(); 1740var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").ToArray(); 1745var x3Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x3").ToArray(); 1746var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").ToArray(); 2702var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 2703var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 2747var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 2748var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 2791var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 2792var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 2843var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 2844var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 3040var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 3041var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 3087var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 3088var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray();
Semantics\PatternMatchingTests_Scope.cs (73)
678var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").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, 719var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 720var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 947var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").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, 988var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 989var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 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(); 6525var d = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 6590var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 6591var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 6594var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 6595var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 6601var x6Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x6").Single(); 6602var x6Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x6").Single(); 6605var x8Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x8").Single(); 6606var x8Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x8").ToArray(); 6610var x14Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x14").ToArray(); 6611var x14Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x14").Single(); 6679var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 6680var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 6683var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 6684var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 6690var x6Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x6").Single(); 6691var x6Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x6").Single(); 6694var x8Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x8").Single(); 6695var x8Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x8").ToArray(); 6699var x14Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x14").ToArray(); 6700var x14Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x14").Single(); 6838var x2Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x2").ToArray(); 6839var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").ToArray(); 6845var x3Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x3").Single(); 6846var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").ToArray(); 6850var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 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); 6930var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 6931var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 6936var d = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 10589var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").ToArray(); 10590var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 10597var x2Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x2").Single(); 10598var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").Single(); 10601var x3Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x3").Single(); 10602var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").Single(); 10605var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 10606var x4Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x4").ToArray(); 10612var x5Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x5").Single(); 10613var x5Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x5").ToArray(); 10617var x8Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x8").ToArray(); 10618var x8Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x8").ToArray(); 10627var x9Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x9").Single(); 10628var x9Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x9").Single(); 10631var x10Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x10").Single(); 10632var x10Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x10").Single(); 10635var x11Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x11").Single(); 10636var x11Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x11").ToArray(); 10640var x12Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x12").Single(); 10641var x12Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x12").ToArray(); 10685var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 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, 10726var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 10727var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").ToArray(); 12211var e = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "e").Single();
Semantics\PatternMatchingTests3.cs (2)
1889var strDecl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(s => s.Identifier.ValueText == "str").ToArray(); 1893var arrDecl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(s => s.Identifier.ValueText == "arr").ToArray();
Semantics\PatternSwitchTests.cs (2)
3254.Where(n => n.Identifier.ValueText == "q" && n.ToFullString().Contains("/*BIND*/")) 3285.Where(n => n.Identifier.ValueText == "q" && n.ToFullString().Contains("/*BIND*/"))
Semantics\PrimaryConstructorTests.cs (54)
1003var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 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(); 1424Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1426Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1467var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1485Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1488Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1526var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1553Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1577Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1615var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 1642Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1645Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 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(); 2653Assert.Equal("C", typeDeclaration.Identifier.ValueText); 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(); 3911switch (identifier.Identifier.ValueText) 4829case ClassDeclarationSyntax { Identifier: { ValueText: "A" } }: 4840case ClassDeclarationSyntax { Identifier: { ValueText: "B" } }: 4851case ConstructorDeclarationSyntax { Identifier: { ValueText: "C" } }: 4862case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 4974case ClassDeclarationSyntax { Identifier: { ValueText: "A" } }: 4985case ClassDeclarationSyntax { Identifier: { ValueText: "B" } }: 4996case ConstructorDeclarationSyntax { Identifier: { ValueText: "C" } }: 5007case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 5042case ClassDeclarationSyntax { Identifier: { ValueText: "A" } }: 5053case ClassDeclarationSyntax { Identifier: { ValueText: "B" } }: 5064case ConstructorDeclarationSyntax { Identifier: { ValueText: "C" } }: 5075case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 5363switch (identifier.Identifier.ValueText) 5848case StructDeclarationSyntax { Identifier: { ValueText: "A" } }: 5859case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 5940case StructDeclarationSyntax { Identifier: { ValueText: "A" } }: 5951case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 5962case ConstructorDeclarationSyntax { Identifier: { ValueText: "A" } }: 5998case StructDeclarationSyntax { Identifier: { ValueText: "A" } }: 6009case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 6020case ConstructorDeclarationSyntax { Identifier: { ValueText: "A" } }: 6092Assert.Equal(identifier, x.Identifier.ValueText); 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(); 9162var p1s = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "p1").ToArray();
Semantics\RecordTests.cs (42)
21144var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 21374var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 21385var y = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").First(); 21398var test = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").First(); 21439var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21485var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21498Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21500Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21541var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 21559Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21562Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21600var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 21627Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21651Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21689var xs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ToArray(); 21716Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21719Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21888var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21925var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 21965var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 22000var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 22079var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 23372Assert.Equal("B", recordDeclaration.Identifier.ValueText); 24643var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 24655Assert.Equal("C", recordDeclaration.Identifier.ValueText); 24678var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 24712var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 24747var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 26347switch (identifier.Identifier.ValueText) 27292case RecordDeclarationSyntax { Identifier: { ValueText: "A" } }: 27303case RecordDeclarationSyntax { Identifier: { ValueText: "B" } }: 27314case ConstructorDeclarationSyntax { Identifier: { ValueText: "C" } }: 27325case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 27437case RecordDeclarationSyntax { Identifier: { ValueText: "A" } }: 27448case RecordDeclarationSyntax { Identifier: { ValueText: "B" } }: 27459case ConstructorDeclarationSyntax { Identifier: { ValueText: "C" } }: 27470case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 27505case RecordDeclarationSyntax { Identifier: { ValueText: "A" } }: 27516case RecordDeclarationSyntax { Identifier: { ValueText: "B" } }: 27527case ConstructorDeclarationSyntax { Identifier: { ValueText: "C" } }: 27538case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 28188Assert.Equal(identifier, x.Identifier.ValueText);
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
819step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C1" }));
Microsoft.CodeAnalysis.CSharp.Features (165)
AddImport\CSharpAddImportFeatureService.cs (3)
304var externAliasString = externAlias != null ? $"extern alias {externAlias.Identifier.ValueText};" : null; 460var externAlias = externAliasDirective?.Identifier.ValueText; 499var rightOfAliasName = aliasQualifiedName.Name.Identifier.ValueText;
ChangeSignature\UnifiedArgumentSyntax.cs (1)
49=> NameColon == null ? string.Empty : ((NameColonSyntax)NameColon).Name.Identifier.ValueText;
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.ReferenceRewriter.cs (1)
95!SyntaxFacts.IsReservedTupleElementName(id.Identifier.ValueText))
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
407return aliasQualifiedNameNode.Alias.Identifier.ValueText;
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (2)
314.Where(d => d.Identifier.ValueText == identifierName.Identifier.ValueText)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (2)
209.Select(a => a.NameColon!.Name.Identifier.ValueText); 213.Select(a => a.NameEquals!.Name.Identifier.ValueText);
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (2)
300var currentParameterNames = baseMethod.ParameterList.Parameters.Select(p => p.Identifier.ValueText).ToImmutableHashSet(); 321MethodDeclarationSyntax method => namedType.GetMembers(method.Identifier.ValueText).OfType<IMethodSymbol>().ToImmutableArray(),
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
74if (SyntaxFacts.GetContextualKeywordKind(targetToken.ValueText) == SyntaxKind.AsyncKeyword)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
145.Select(a => a.NameColon!.Name.Identifier.ValueText);
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
191.Select(i => i.Identifier.ValueText));
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (3)
78p => p.NameColon?.Name.Identifier.ValueText).Where(s => !string.IsNullOrEmpty(s))!); 108return GetMemberType(type, name: memberAccess.Name.Identifier.ValueText, document, semanticModel, position); 112return GetMemberType(type, name: identifier.Identifier.ValueText, document, semanticModel, position);
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (5)
196var xmlElementName = startTag.Name.LocalName.ValueText; 287return (name: nameSyntax?.LocalName.ValueText, attributes); 319attributeName = attributeSyntax.Name.LocalName.ValueText; 370private string GetAttributeName(XmlAttributeSyntax attribute) => attribute.Name.LocalName.ValueText; 381return nameAttribute.Identifier.Identifier.ValueText;
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (4)
61identifierName.Identifier.ValueText == iterationVariable.ValueText && 109identifierName.Identifier.ValueText == iterationVariable.ValueText;
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
194identifier.Identifier.ValueText == forEachStatement.Identifier.ValueText)
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (2)
66lastDeclaration.Identifier.ValueText.Equals(identifierName.Identifier.ValueText) &&
ConvertLinq\ConvertForEachToLinqQuery\ToCountConverter.cs (1)
29=> expression is LiteralExpressionSyntax literalExpression && literalExpression.Token.ValueText == "0";
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (10)
284switch (memberAccessExpression.Name.Identifier.ValueText) 607_introducedLocalNames.Add(freeToken.ValueText); 628if (forEachStatement.Identifier.ValueText != identifierName) 636_cancellationToken).ValueText != identifierName) 662forEachStatement.Identifier.ValueText == identifierName.Identifier.ValueText && 663queryExpressionProcessingInfo.IdentifierNames.Contains(identifierName.Identifier.ValueText)) 963IdentifierNames = [fromClause.Identifier.ValueText]; 970if (!IdentifierNames.Add(identifier.ValueText)) 982=> IdentifierNames.Contains(identifier.ValueText);
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
97var methodTargetingAttributes = typeDeclaration.AttributeLists.Where(list => list.Target?.Identifier.ValueText == "method");
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
27element = node is XmlElementSyntax { StartTag.Name.LocalName.ValueText: var elementName } xmlElement && elementName == name
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
65return declaration.Identifier.ValueText == WellKnownMemberNames.TopLevelStatementsEntryPointTypeName &&
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (3)
64_expressions.Add(node.Identifier.ValueText); 95expressions.Add(declarator.Identifier.ValueText); 152expressions.Add(t.Identifier.ValueText);
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
84_expressions.Add(catchClause.Declaration.Identifier.ValueText); 149select p.Identifier.ValueText);
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (4)
123var identifierAlias = identifierName.Identifier.ValueText; 204var canTrySimplify = node.Identifier.ValueText.EndsWith("Attribute", StringComparison.Ordinal); 209canTrySimplify = CanReplaceIdentifierWithAlias(node.Identifier.ValueText) 210|| CanReplaceIdentifierWithPredefinedType(node.Identifier.ValueText);
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (6)
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) }, 287if (textTokens.Count != 1 && string.IsNullOrWhiteSpace(firstTextToken.ValueText)) 294existingCommentText = textTokens.Count == 1 ? "" : firstTextToken.ValueText;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
443var name = designation.Identifier.ValueText;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (2)
50var name = ((VariableDeclaratorSyntax)expression.Parent.Parent).Identifier.ValueText; 79var unqualifiedNameIdentifierValueText = unqualifiedName.Identifier.ValueText;
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
79return identifierName.Identifier.ValueText;
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (2)
51var contextualKind = SyntaxFacts.GetContextualKeywordKind(token.ValueText); 93if (identifierToken.ValueText != string.Empty &&
GenerateType\CSharpGenerateTypeService.cs (3)
649namespaceContainers.Add(qualifiedName.Right.Identifier.ValueText); 654namespaceContainers.Add(((SimpleNameSyntax)name).Identifier.ValueText); 812name: propertyName.Identifier.ValueText,
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (1)
188identifierName.Identifier.ValueText == parameter.Name)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
393var localFunctionIdentifiers = localFunctions.Select(node => ((LocalFunctionStatementSyntax)node).Identifier.ValueText);
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (4)
72IdentifierNameSyntax identifierName => identifierName.Identifier.ValueText, 76=> int.TryParse(literal.Token.ValueText, out var errorCodeNumber) 78: literal.Token.ValueText, 112: argument.NameColon.Name.Identifier.ValueText == "checkId") // Named argument "checkId"
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
295name.LocalName.ValueText == "value";
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (2)
261identifier.Identifier.ValueText == variable.Identifier.ValueText;
SignatureHelp\AttributeSignatureHelpProvider.cs (2)
61token.ValueText.Length == 1 && 62IsTriggerCharacter(token.ValueText[0]) &&
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (6)
287token.ValueText.Length == 1 && 288IsTriggerCharacterInternal(token.ValueText[0]) && 336token.ValueText.Length == 1 && 337IsTriggerCharacterInternal(token.ValueText[0]) && 371token.ValueText.Length == 1 && 372IsTriggerCharacterInternal(token.ValueText[0]) &&
SignatureHelp\GenericNameSignatureHelpProvider.cs (3)
64token.ValueText.Length == 1 && 65IsTriggerCharacter(token.ValueText[0]) && 107var name = genericIdentifier.ValueText;
SignatureHelp\InitializerExpressionSignatureHelpProvider.cs (2)
49token.ValueText.Length == 1 && 50IsTriggerCharacter(token.ValueText[0]) &&
SignatureHelp\SignatureHelpUtilities.cs (5)
38list => list.Arguments.Select(argument => argument.NameColon?.Name.Identifier.ValueText); 45argument => argument.NameColon?.Name.Identifier.ValueText ?? argument.NameEquals?.Name.Identifier.ValueText); 136token.ValueText.Length == 1 && 137isTriggerCharacter(token.ValueText[0]) &&
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
29private static readonly Func<TupleExpressionSyntax, IEnumerable<string>> s_getArgumentNames = e => e.Arguments.Select(a => a.NameColon?.Name.Identifier.ValueText ?? string.Empty);
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
86new SnippetPlaceholder(identifier.ValueText, identifier.SpanStart),
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
98placeholderBuilder.Add(declaratorIdentifier.ValueText, declaratorIdentifier.SpanStart);
Snippets\CSharpForEachLoopSnippetProvider.cs (2)
47token is { RawKind: (int)SyntaxKind.IdentifierToken, ValueText: "await", Parent: IdentifierNameSyntax { Parent: ExpressionStatementSyntax } }) 68var isAsync = syntaxContext.TargetToken is { RawKind: (int)SyntaxKind.AwaitKeyword } or { RawKind: (int)SyntaxKind.IdentifierToken, ValueText: "await" };
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (3)
60methodDeclaration.Identifier.ValueText != WellKnownMemberNames.EntryPointMethodName || 69if (mainTypeName != null && containingTypeDeclaration.Identifier.ValueText != mainTypeName) 73if (methodDeclaration.ParameterList.Parameters is [{ Identifier.ValueText: not "args" }])
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
118if (identifierName.Identifier.ValueText == "_") 394if (identifierName.Identifier.ValueText == variableName)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (6)
154if (invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression && 243Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) }, 256if (!Equals(conditionName.Identifier.ValueText, invocationName.Identifier.ValueText)) 289if (!Equals(declarator.Identifier.ValueText, conditionName.Identifier.ValueText))
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
74if (typeSymbol.GetMembers(identifierName.Identifier.ValueText).Any())
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (3)
110if (parameter.Identifier.ValueText != argumentIdentifier.Identifier.ValueText) 337Expression: MemberAccessExpressionSyntax { Name.Identifier.ValueText: nameof(Task.ConfigureAwait), Expression: var underlying }
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
235Right: IdentifierNameSyntax { Identifier.ValueText: "value" }
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (6)
116if (memberAccessExpression.Name.Identifier.ValueText is not CreateBuilderName and not GetInstanceName) 119if (memberAccessExpression.Name.Identifier.ValueText == GetInstanceName && 120memberAccessExpression.Expression is not GenericNameSyntax { Identifier.ValueText: nameof(ArrayBuilder<int>) }) 216if (identifierName.Identifier.ValueText == identifier.ValueText && 220memberAccess.Name.Identifier.ValueText
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
278if (memberAccess.Name.Identifier.ValueText == AsSpanName && !copiedData) 406var name = memberAccess.Name.Identifier.ValueText;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (5)
546if (identifier.Identifier.ValueText != local.Name) 779Identifier.ValueText: var variableName, 801Expression: IdentifierNameSyntax { Identifier.ValueText: var elementName }, 1098if (memberAccess.Name is not IdentifierNameSyntax { Identifier.ValueText: EmptyName }) 1124Identifier.ValueText: EmptyName,
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
176if (current is not MemberAccessExpressionSyntax(SyntaxKind.SimpleMemberAccessExpression) { Name.Identifier.ValueText: "Length" or "Count" } memberAccess)
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
254if (identifierName.Identifier.ValueText == localName)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (4)
257if (identifierName.Identifier.ValueText == local.Name && 281memberAccessExpression.Name.Identifier.ValueText == WellKnownMemberNames.DelegateInvokeName) 374if (variableDeclarator.Identifier.ValueText == identifierName.Identifier.ValueText)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
335identifierName.Identifier.ValueText == variableName &&
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (4)
190if (identifierName.Identifier.ValueText == asOperand?.Name && 198if (identifierName.Identifier.ValueText == localSymbol.Name) 227identifierName.Identifier.ValueText == localSymbol.Name && 247identifierName.Identifier.ValueText == localSymbol.Name &&
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (3)
213var variableName = variable.Identifier.ValueText; 224declarator.Identifier.ValueText.Equals(variableName)) 229designation.Identifier.ValueText.Equals(variableName))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
490if (namedType.GetMembers(leftIdentifier.Identifier.ValueText).IsEmpty)
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (2)
104if (variableDeclarator.Identifier.ValueText != secondAssignmentExprTempIdentifier.ValueText)
src\Analyzers\CSharp\Analyzers\ValidateFormatString\CSharpValidateFormatStringDiagnosticAnalyzer.cs (1)
27if (argument.NameColon != null && argument.NameColon.Name.Identifier.ValueText.Equals(searchArgumentName))
src\Analyzers\CSharp\CodeFixes\AddAnonymousTypeMemberName\CSharpAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
42=> initializer.Initializers.Where(i => i.NameEquals != null).Select(i => i.NameEquals!.Name.Identifier.ValueText);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
630element.StartTag?.Name.LocalName.ValueText == DocumentationCommentXmlNames.SummaryElementName); 779element.StartTag?.Name.LocalName.ValueText == DocumentationCommentXmlNames.SummaryElementName);
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (2)
38=> attribute.Identifier.Identifier.ValueText; 57=> element.StartTag.Name.LocalName.ValueText;
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
30if (identifierToken.ValueText != string.Empty &&
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
91invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression 138invocationExpression.Expression is MemberAccessExpressionSyntax { Name: IdentifierNameSyntax { Identifier.ValueText: nameof(Action.Invoke) } } memberAccessExpression
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (3)
55if (newName.ValueText == AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName && 73return newName.ValueText == AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName 125newNameNode is IdentifierNameSyntax { Identifier.ValueText: AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName } &&
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
311var name = argumentNameColon.Name.Identifier.ValueText;
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
229if (!properties.Values.Any(v => v == current.Identifier.ValueText)) 546if (xmlElement is { Name.LocalName.ValueText: "see" })
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (3)
51element = node is XmlElementSyntax { StartTag.Name.LocalName.ValueText: var elementName } xmlElement && elementName == name 152var constructorContents = typeStructure.Content.Any(n => n is XmlElementSyntax { StartTag.Name.LocalName.ValueText: s_summaryTagName }) 206existingParamNodeNames.Add(nameAttribute.Identifier.Identifier.ValueText);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (13)
EditAndContinue\SyntaxUtilitiesTests.cs (13)
184var m0 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M0"); 185var m1 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M1"); 186var m2 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M2"); 187var m3 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M3"); 189var f1 = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(m => m.Identifier.ValueText == "f1"); 190var f2 = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(m => m.Identifier.ValueText == "f2"); 192var l1 = m3.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(m => m.Identifier.ValueText == "l1").Initializer. 195var l2 = m3.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(m => m.Identifier.ValueText == "l2").Initializer. 198var l3 = m3.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(m => m.Identifier.ValueText == "l3").Initializer. 252var x = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(m => m.Identifier.ValueText == "X"); 253var m1 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M1"); 254var m2 = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M2"); 255var f = m2.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(m => m.Identifier.ValueText == "f");
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IObjectCreationExpression.cs (1)
2400var m = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(m => m.Identifier.ValueText == "M");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (372)
Semantics\BindingTests.cs (15)
2726.First(x => x.Parent.IsKind(SyntaxKind.SimpleMemberAccessExpression) && x.Identifier.ValueText.Equals("M0")); 2738.First(x => x.Parent.IsKind(SyntaxKind.SimpleMemberAccessExpression) && x.Identifier.ValueText.Equals("M1")); 2782.Where(x => x.Identifier.ValueText.Equals("MyMethod")).ToArray(); 2837.First(x => x.Parent.IsKind(SyntaxKind.SimpleMemberAccessExpression) && x.Identifier.ValueText.Equals("M0")); 2849.First(x => x.Parent.IsKind(SyntaxKind.SimpleMemberAccessExpression) && x.Identifier.ValueText.Equals("M1")); 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;
Semantics\DeconstructionTests.cs (2)
4176Assert.Same(x1, model.GetSymbolInfo(refs.Where(r => r.Identifier.ValueText == "x1").Single()).Symbol); 4181Assert.Same(x2, model.GetSymbolInfo(refs.Where(r => r.Identifier.ValueText == "x2").Single()).Symbol);
Semantics\DynamicTests.cs (110)
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\ImplicitObjectCreationTests.cs (1)
4574var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "aParameter").Single();
Semantics\ImportsTests.cs (1)
144var externAliases = compilationUnits.SelectMany(cu => cu.Externs).Select(e => e.Identifier.ValueText).Distinct();
Semantics\InitOnlyMemberTests.cs (1)
3156.Single(s => s.Identifier.ValueText == "_p");
Semantics\LambdaTests.cs (12)
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(); 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(); 6510.Where(i => i.Identifier.ValueText == "parameter") 6820.Where(i => i.Identifier.ValueText == "_") 6849.Where(i => i.Identifier.ValueText == "_") 7011var action = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.ValueText == "Action");
Semantics\LocalFunctionTests.cs (21)
501Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 549Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 813Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 1720var x = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(v => v.Identifier.ValueText == "x").Single(); 1769.Where(id => id.Identifier.ValueText == "A") 1787.Where(id => id.Identifier.ValueText == "CLSCompliant") 1844.Where(id => id.Identifier.ValueText == "A") 1862.Where(id => id.Identifier.ValueText == "CLSCompliant") 4690var designation = descendents.OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == name).Single(); 4694var refs = descendents.OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == name).ToArray(); 4731var declarator = descendents.OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == name).Single(); 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(); 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; 7640.Where(i => i.Identifier.ValueText == "TParameter") 8685.Where(i => i.Identifier.ValueText == parameterName) 8964return node.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "parameter").Single(); 9553.Where(i => i.Identifier.ValueText == "value") 10173.Where(i => i.Identifier.ValueText == "P")
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\NullableContextTests.cs (2)
2020Assert.Equal(expectedText, syntax.Identifier.ValueText); 2059Assert.Equal(expectedText, syntax.Identifier.ValueText);
Semantics\NullableReferenceTypesTests.cs (3)
65891Assert.Equal("target", function1.Identifier.ValueText); 65895Assert.Equal("target", function2.Identifier.ValueText); 65900.Single(s => s.Keyword.ValueText == "object");
Semantics\OperatorTests.cs (2)
7057Assert.Equal("i2", syntax.Identifier.ValueText); 7212Assert.Equal("i2", syntax.Identifier.ValueText);
Semantics\QueryTests.cs (11)
1453var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 1662var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 1722var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 1760var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 2897var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "C").Single(); 2930var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "C").Single(); 3420var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 3464var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 3511var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Test").Single(); 3550var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Test2").Single(); 3598var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "QueryExpressionTest").Single();
Semantics\RecordStructTests.cs (15)
2594var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").First(); 2606Assert.Equal("C", recordDeclaration.Identifier.ValueText); 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(); 3244Assert.Equal(identifier, x.Identifier.ValueText); 6062switch (identifier.Identifier.ValueText) 6574case RecordDeclarationSyntax { Identifier: { ValueText: "A" } }: 6585case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 6666case RecordDeclarationSyntax { Identifier: { ValueText: "A" } }: 6677case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 6688case ConstructorDeclarationSyntax { Identifier: { ValueText: "A" } }: 6724case RecordDeclarationSyntax { Identifier: { ValueText: "A" } }: 6735case MethodDeclarationSyntax { Identifier: { ValueText: "M" } }: 6746case ConstructorDeclarationSyntax { Identifier: { ValueText: "A" } }:
Semantics\RefEscapingTests.cs (1)
71.Single(n => n.Identifier.ValueText == name);
Semantics\RefFieldTests.cs (3)
26788foreach (var node in tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText is "a" or "b" or "c")) 26840foreach (var node in tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText is "a" or "b" or "c")) 26892foreach (var node in tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText is "a" or "b" or "c"))
Semantics\ScriptSemanticsTests.cs (3)
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 (1)
231.Single(s => s.Identifier.ValueText == "_p");
Semantics\TopLevelStatementsTests.cs (45)
324var name = localRef.Identifier.ValueText; 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(); 503var name = localRef.Identifier.ValueText; 540var localRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").ToArray(); 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(); 1706var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 1882var nameRefs = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 2100var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 2266var nameRefs = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 2446var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray(); 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(); 4090var nameRefs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").ToArray(); 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(); 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(); 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(); 9708var conversionInTopLevel = speculativeModelInTopLevel.GetConversion(nodeToSpeculate.DescendantTokens().Single(n => n.ValueText == "x").Parent); 9713var conversionOutsideTopLevel = speculativeModelOutsideTopLevel.GetConversion(nodeToSpeculate.DescendantTokens().Single(n => n.ValueText == "x").Parent);
Semantics\UnsafeTests.cs (2)
6331.Single(n => n.Identifier.ValueText == name); 6390.Single(n => n.Identifier.ValueText == name);
SourceGeneration\GeneratorDriverTests.cs (7)
1502.Select((c, _) => c.Identifier.ValueText) 2406Assert.Equal("C", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2411Assert.Equal("D", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2422Assert.Equal("C", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2427Assert.Equal("D", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2439Assert.Equal("E", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2444Assert.Equal("D", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText);
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (44)
83step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C1" })); 162step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C2" })); 335step => Assert.True(step.Outputs.Single().Value is LocalFunctionStatementSyntax { Identifier.ValueText: "LocalFunc" })); 371step => Assert.True(step.Outputs.Single().Value is LocalFunctionStatementSyntax { Identifier.ValueText: "LocalFunc" })); 410step => Assert.True(step.Outputs.Single().Value is LocalFunctionStatementSyntax { Identifier.ValueText: "LocalFunc" })); 439step => Assert.True(step.Outputs.Single().Value is TypeParameterSyntax { Identifier.ValueText: "T" })); 472step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax { Identifier.ValueText: "M" })); 505step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax { Identifier.ValueText: "M" })); 537step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax { Identifier.ValueText: "M", Body: null, ExpressionBody: null })); 569step => Assert.True(step.Outputs.Single().Value is MethodDeclarationSyntax { Identifier.ValueText: "M", Body: not null })); 600step => Assert.True(step.Outputs.Single().Value is VariableDeclaratorSyntax { Identifier.ValueText: "m" })); 632v => Assert.True(v.Value is VariableDeclaratorSyntax { Identifier.ValueText: "m" }), 633v => Assert.True(v.Value is VariableDeclaratorSyntax { Identifier.ValueText: "n" }))); 664step => Assert.True(step.Outputs.Single().Value is VariableDeclaratorSyntax { Identifier.ValueText: "m" })); 696v => Assert.True(v.Value is VariableDeclaratorSyntax { Identifier.ValueText: "m" }), 697v => Assert.True(v.Value is VariableDeclaratorSyntax { Identifier.ValueText: "n" }))); 787step => Assert.True(step.Outputs.Single().Value is TypeParameterSyntax { Identifier.ValueText: "T" })); 824step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C1" })); 861step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C2" })); 898step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C1" })); 935step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C2" })); 1043step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1080step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1118step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1156step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1194step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1232step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1346{ Value: MethodDeclarationSyntax { Identifier.ValueText: "SomeFunction" } }, 1347{ Value: MethodDeclarationSyntax { Identifier.ValueText: "SomeFunction2" } }])); 1392{ Value: MethodDeclarationSyntax { Identifier.ValueText: "SomeFunction" } }, 1393{ Value: MethodDeclarationSyntax { Identifier.ValueText: "SomeFunction2" } }])); 1429step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1436step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1476step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1483step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1523step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1529step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1575step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1624t => Assert.True(t.Value is ClassDeclarationSyntax { Identifier.ValueText: "C1" }), 1625t => Assert.True(t.Value is ClassDeclarationSyntax { Identifier.ValueText: "C2" }))); 1676step => Assert.Collection(step.Outputs, t => Assert.True(t.Value is ClassDeclarationSyntax { Identifier.ValueText: "C1" })), 1677step => Assert.Collection(step.Outputs, t => Assert.True(t.Value is ClassDeclarationSyntax { Identifier.ValueText: "C2" }))); 1740step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1788step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" }));
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (45)
54step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 86step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 162step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 192Assert.True(step.Outputs.First().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" }); 193Assert.True(step.Outputs.Last().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" }); 224Assert.True(step.Outputs.First().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" }); 225Assert.False(step.Outputs.Any(o => o.Value is ClassDeclarationSyntax { Identifier.ValueText: "D" })); 256Assert.False(step.Outputs.Any(o => o.Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 257Assert.True(step.Outputs.Last().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" }); 290Assert.True(step.Outputs.First().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" }); 291Assert.True(step.Outputs.Last().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" }); 321step => Assert.True(step.Outputs.First().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 347step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 373step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 399step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 432step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 460step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 546step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 579step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 611step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 810step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 841step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 871step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 956step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 985step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1017step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1024step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1057step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1064step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1103step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1156step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1230step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1262step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1315step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1324Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" }); 1373step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1380step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1442step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1485step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1517step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1568step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1596step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" }), 1597step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" })); 1629step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "C" })); 1653step => Assert.True(step.Outputs.Single().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" }));
SourceGeneration\SyntaxAwareGeneratorTests.cs (21)
857var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 897var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 903var source2 = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is ClassDeclarationSyntax fds, (c, _) => ((ClassDeclarationSyntax)c.Node).Identifier.ValueText); 944syntaxFilterVisited.Add(fds.Declaration.Variables[0].Identifier.ValueText); 948}, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1016var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1091var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1172var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1180var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1223var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1306var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1388syntaxFieldsCalledFor.Add(fds.Declaration.Variables[0].Identifier.ValueText); 1393(c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Syntax") 1515var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1574syntaxCalledFor.Add(((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1575return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1625syntaxCalledFor.Add(((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1626return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1682return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1741return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText; 1794return ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (52)
Compilation\GetSemanticInfoBrokenCodeTests.cs (1)
300var identifierSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(n => n.Identifier.ValueText == "CompletionItem");
Compilation\GetSemanticInfoTests.cs (5)
4109Assert.Equal("x", localDecl1.Variables.Single().Identifier.ValueText); 4111Assert.Equal("q", localDecl2.Variables.Single().Identifier.ValueText); 4164Assert.Equal("x", localDecl1.Variables.Single().Identifier.ValueText); 4166Assert.Equal("q", localDecl2.Variables.Single().Identifier.ValueText); 4355var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(id => id.Identifier.ValueText == "b");
Compilation\SemanticModelAPITests.cs (3)
43var m = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(decl => decl.Identifier.ValueText == "M"); 3129Assert.Equal("x", syntax.Identifier.ValueText); 3743Assert.Equal("s", identifier.Identifier.ValueText);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (7)
2845Assert.Equal("C", classNode.Identifier.ValueText); 2850Assert.Equal("M", explicitMethodNode.Identifier.ValueText); 2859Assert.Equal("P", explicitPropertyNode.Identifier.ValueText); 2870Assert.Equal("get", explicitPropertyGetterNode.Keyword.ValueText); 2880Assert.Equal("set", explicitPropertySetterNode.Keyword.ValueText); 3901var param = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParameterSyntax>().Where(p => p.Identifier.ValueText == "name").First(); 5206var node = tree.GetRoot().DescendantNodes().Single(node => node is IdentifierNameSyntax { Identifier: { ValueText: "b" } });
DocumentationComments\CrefTests.cs (2)
5678AssertEx.None(cref.DescendantTokens(descendIntoTrivia: true), token => token.ValueText == null); 5693AssertEx.None(cref.DescendantTokens(descendIntoTrivia: true), token => token.ValueText == null);
Symbols\CheckedUserDefinedOperatorsTests.cs (10)
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 (4)
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 (2)
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 (1)
74var toStringIdentifier = identifiers.Where(node => node.Identifier.ValueText.Equals("ToString")).Single();
Symbols\Source\NullablePublicAPITests.cs (14)
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(); 3500.First(i => i.Identifier.ValueText == "o1"); 3507var mDeclaration = root.DescendantNodes().OfType<MethodDeclarationSyntax>().First(m => m.Identifier.ValueText == "M"); 3554.First(i => i.Identifier.ValueText == "o1"); 3565.First(i => i.Identifier.ValueText == "o2"); 3615.First(i => i.Identifier.ValueText == "o1"); 3626.First(i => i.Identifier.ValueText == "o2"); 3667var o2Reference = localFunction.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "o2"); 3775.First(i => i.Identifier.ValueText == "o1"); 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 (2)
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\SymbolExtensionTests.cs (1)
252var method = model.GetSymbolInfo(tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Method").Single()).Symbol.GetSymbol<MethodSymbol>();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (110)
Diagnostics\DiagnosticTest.cs (2)
1990Assert.Equal(128, defineName.ValueText.Length); 1996Assert.Equal(2335, errorCodeName.ValueText.Length);
LexicalAndXml\LexicalTests.cs (74)
619Assert.Equal(text, token.ValueText); 634Assert.Equal(text, token.ValueText); 649Assert.Equal(text, token.ValueText); 664Assert.Equal(text, token.ValueText); 679Assert.Equal(text, token.ValueText); 694Assert.Equal("x", token.ValueText); 709Assert.Equal("if", token.ValueText); 724Assert.NotNull(token.ValueText); 725Assert.IsType<string>(token.ValueText); 726Assert.Equal(1, ((string)token.ValueText).Length); 741Assert.NotNull(token.ValueText); 742Assert.IsType<string>(token.ValueText); 743Assert.Equal(1, ((string)token.ValueText).Length); 758Assert.NotNull(token.ValueText); 759Assert.IsType<string>(token.ValueText); 760Assert.Equal(1, ((string)token.ValueText).Length); 775Assert.NotNull(token.ValueText); 776Assert.IsType<string>(token.ValueText); 777Assert.Equal(1, ((string)token.ValueText).Length); 792Assert.NotNull(token.ValueText); 793Assert.IsType<string>(token.ValueText); 794Assert.Equal(3, ((string)token.ValueText).Length); 809Assert.NotNull(token.ValueText); 810Assert.IsType<string>(token.ValueText); 811Assert.Equal(4, ((string)token.ValueText).Length); 826Assert.NotNull(token.ValueText); 827Assert.IsType<string>(token.ValueText); 828Assert.Equal(1, ((string)token.ValueText).Length); 848Assert.Equal(value, token.ValueText); 868Assert.NotNull(token.ValueText); 869Assert.IsType<string>(token.ValueText); 870Assert.Equal(3, ((string)token.ValueText).Length); 889Assert.Equal(text, token.ValueText); 968Assert.Equal(text, token.ValueText); 983Assert.Equal("literal", token.ValueText); 998Assert.Equal("҉ ҉̵̞̟̠̖̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̐̑̒̓̔̊̋̌̍̎̏̐̑̒̓̔̿̿̿… ͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿̿̚ ҉ ҉҉̡̢̡̢̛̛̖̗̘̙̜̝̞̟̠̖̗̘̙̜̝̞̟̠̊̋̌̍̎̏̐̑̒̓̔̊̋̌… ̒̓̔̕̚ ̍̎̏̐̑̒̓̔̕̚̕̚ ̡̢̛̗̘̙̜̝̞̟̠̊̋̌̍̎̏̚ ̡̢̡̢̛̛̖̗̘̙̜̝̞̟̠̖̗̘̙̜̝̞̟̠̊̋̌̍̎̏̐̑̒̓̔̊̋̌̍̎… ̕̚̕̚ ̔̕̚̕̚҉ ҉̵̞̟̠̖̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̐̑̒̓̔̊̋̌̍̎̏̐̑̒̓̔̿̿̿… ͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿̿̚ ҉", token.ValueText); 1013Assert.Equal("literal", token.ValueText); 1028Assert.Equal("multi line\r\nliteral", token.ValueText); 1044Assert.Equal("literal", token.ValueText); 1060Assert.Equal("literal", token.ValueText); 1076Assert.Equal("literal", token.ValueText); 1092Assert.Equal(value, token.ValueText); 1108Assert.Equal(value, token.ValueText); 1124Assert.Equal(value, token.ValueText); 1141Assert.Equal(value, token.ValueText); 1160Assert.Equal(value, token.ValueText); 1178Assert.Equal(value, token.ValueText); 1196Assert.Equal(value, token.ValueText); 1212Assert.Equal(value, token.ValueText); 1228Assert.Equal(value, token.ValueText); 1244Assert.Equal(value, token.ValueText); 1260Assert.Equal(value, token.ValueText); 1276Assert.Equal(value, token.ValueText); 1292Assert.Equal(value, token.ValueText); 1308Assert.Equal(value, token.ValueText); 1324Assert.Equal(value, token.ValueText); 1341Assert.Equal(value, token.ValueText); 1357Assert.Equal(value, token.ValueText); 1373Assert.Equal(value, token.ValueText); 1389Assert.Equal(value, token.ValueText); 1405Assert.Equal(value, token.ValueText); 1421Assert.Equal(value, token.ValueText); 1437Assert.Equal(value, token.ValueText); 1453Assert.Equal(value, token.ValueText); 1469Assert.Equal(value, token.ValueText); 1486Assert.Equal(value, token.ValueText); 1502Assert.Equal(SlidingTextWindow.InvalidCharacter, Char.Parse(token.ValueText)); 1519Assert.Equal(value, token.ValueText); 1536Assert.Equal(value, token.ValueText); 1553Assert.Equal(SlidingTextWindow.InvalidCharacter, Char.Parse(token.ValueText)); 1571Assert.Equal(value, token.ValueText); 1589Assert.Equal(value, token.ValueText); 1713Assert.Equal("class", token.ValueText); 1729Assert.Equal("class", token.ValueText);
LexicalAndXml\PreprocessorTests.cs (9)
194Assert.Equal(exp.Text, ((DefineDirectiveTriviaSyntax)dt).Name.ValueText); // Text 206Assert.Equal(exp.Text, ((LoadDirectiveTriviaSyntax)dt).File.ValueText); 212Assert.Equal(exp.Text, ((UndefDirectiveTriviaSyntax)dt).Name.ValueText); 218Assert.Equal(exp.Text, ((ReferenceDirectiveTriviaSyntax)dt).File.ValueText); 266var actualText = setting.ValueText; 267if (!string.IsNullOrEmpty(target.ValueText)) 269actualText += " " + target.ValueText; 341Assert.Equal(warningNumber, token.ValueText); 346Assert.Equal(warningNumber, token.ValueText);
LexicalAndXml\RawStringLiteralLexingTests.cs (2)
196Assert.NotNull(token.ValueText); 197Assert.Equal(expectedValue, token.ValueText);
Parsing\DeclarationParsingTests.cs (2)
298Assert.Equal("assembly", ad.Target.Identifier.ValueText); 327Assert.Equal("assembly", ad.Target.Identifier.ValueText);
Parsing\ExpressionParsingTests.cs (1)
532Assert.Equal("\"stuff\"", us.Token.ValueText);
Parsing\NameParsingTests.cs (6)
783Assert.NotEqual(text, tok.ValueText); 784Assert.Equal("\u0915\u094d\u0937", tok.ValueText); //formatting character \u200d removed 787Assert.False(SyntaxFacts.ContainsDroppedIdentifierCharacters(tok.ValueText)); 799Assert.NotEqual(text, tok.ValueText); 800Assert.Equal("xy", tok.ValueText); // formatting character SOFT HYPHEN (U+00AD) removed 803Assert.False(SyntaxFacts.ContainsDroppedIdentifierCharacters(tok.ValueText));
Syntax\LambdaUtilitiesTests.cs (1)
57var methodDef = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(d => d.Identifier.ValueText == "M").Single();
Syntax\StructuredTriviaTests.cs (1)
27Assert.Equal(conditionName, ((IdentifierNameSyntax)structuredTrivia.Condition).Identifier.ValueText);
Syntax\SyntaxDiffingTests.cs (2)
310Assert.Equal("Sign", node.Identifier.ValueText); 375Assert.Equal("Object", node.Identifier.ValueText);
Syntax\SyntaxFactoryTests.cs (3)
27Assert.Equal("$@\"", token.ValueText); 220Assert.Equal(valueText, token.ValueText); 377Assert.Equal("3.14", literal.ValueText);
Syntax\SyntaxNodeTests.cs (7)
1863Assert.Equal("Bar", qualified.GetUnqualifiedName().Identifier.ValueText); 1868Assert.Equal("Bar", generic.GetUnqualifiedName().Identifier.ValueText); 1873Assert.Equal("Bar", qualifiedGeneric.GetUnqualifiedName().Identifier.ValueText); 1878Assert.Equal("Goo", alias.GetUnqualifiedName().Identifier.ValueText); 1883Assert.Equal("Bar", aliasGeneric.GetUnqualifiedName().Identifier.ValueText); 1888Assert.Equal("Bar", aliasQualified.GetUnqualifiedName().Identifier.ValueText); 1893Assert.Equal("Bar", aliasQualifiedGeneric.GetUnqualifiedName().Identifier.ValueText);
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 (140)
Classification\ClassificationHelpers.cs (2)
454if (token.ToString() != token.ValueText) 463switch (token.ValueText)
Classification\SyntaxClassification\FunctionPointerUnmanagedCallingConventionClassifier.cs (1)
30var name = callingConvention.Name.ValueText;
CodeGeneration\CSharpSyntaxGenerator.cs (11)
852ev.Identifier.ValueText, 1903BaseTypeDeclarationSyntax baseTypeDeclaration => baseTypeDeclaration.Identifier.ValueText, 1904DelegateDeclarationSyntax delegateDeclaration => delegateDeclaration.Identifier.ValueText, 1905MethodDeclarationSyntax methodDeclaration => methodDeclaration.Identifier.ValueText, 1907PropertyDeclarationSyntax propertyDeclaration => propertyDeclaration.Identifier.ValueText, 1908EnumMemberDeclarationSyntax enumMemberDeclaration => enumMemberDeclaration.Identifier.ValueText, 1909EventDeclarationSyntax eventDeclaration => eventDeclaration.Identifier.ValueText, 1912ParameterSyntax parameter => parameter.Identifier.ValueText, 1914VariableDeclarationSyntax variableDeclaration when variableDeclaration.Variables.Count == 1 => variableDeclaration.Variables[0].Identifier.ValueText, 1915VariableDeclaratorSyntax variableDeclarator => variableDeclarator.Identifier.ValueText, 1916TypeParameterSyntax typeParameter => typeParameter.Identifier.ValueText,
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (16)
123aliasMap[usingDecl.Alias.Name.Identifier.ValueText] = mappedName; 188localFunction.Identifier.ValueText, GetMethodSuffix(localFunction), 223typeDeclaration.Identifier.ValueText, 254enumDeclaration.Identifier.ValueText, null, 281ctorDecl.Identifier.ValueText, 297delegateDecl.Identifier.ValueText, 312enumMember.Identifier.ValueText, null, 326eventDecl.Identifier.ValueText, null, 355method.Identifier.ValueText, GetMethodSuffix(method), 371property.Identifier.ValueText, null, 394variableDeclarator.Identifier.ValueText, null, 429existingFieldPropNames.Add(property.Identifier.ValueText); 433existingFieldPropNames.Add(variable.Identifier.ValueText); 440if (!existingFieldPropNames.Contains(parameter.Identifier.ValueText)) 444parameter.Identifier.ValueText, null, 660=> name.Identifier.ValueText;
Recommendations\CSharpRecommendationServiceRunner.cs (3)
444argumentIdentifier.ValueText == parameterName) 461fieldInitializerIdentifier.ValueText == parameterName) 468propertyInitializerIdentifier.ValueText == parameterName)
Rename\CSharpRenameRewriterLanguageService.cs (14)
233var isOldText = token.ValueText == _originalText; 236token.ValueText == _replacementText || 238_possibleNameConflicts.Contains(token.ValueText) || 353? newToken.ValueText[..(newToken.ValueText.IndexOf('_') + 1)] 573var oldIdentifier = newToken.ValueText; 611valueText = identifierName.Identifier.ValueText; 712else if (newToken.IsKind(SyntaxKind.IdentifierToken) && newToken.Parent.IsKind(SyntaxKind.XmlName) && newToken.ValueText == _originalText) 758var locals = enclosingMemberDeclaration.GetLocalDeclarationMap()[token.ValueText]; 766.Where(s => s.MatchesKind(SymbolKind.Local, SymbolKind.Parameter) && s.Name == token.ValueText); 893if (usingDirective.Alias.Name.Identifier.ValueText == currentUsing.Alias!.Name.Identifier.ValueText) 907if (typeParameter != currentTypeParameter && token.ValueText == typeParameter.Identifier.ValueText) 1133valueText = ((IdentifierNameSyntax)name).Identifier.ValueText;
Simplification\CSharpSimplificationService.cs (5)
104if (SyntaxFacts.GetKeywordKind(syntaxToken.ValueText) == SyntaxKind.None && SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.None) 109if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken) 123syntaxToken.ValueText == "global") 133syntaxToken.ValueText,
Simplification\CSharpSimplificationService.Expander.cs (3)
299elementName = argument.NameColon.Name.Identifier.ValueText; 594Debug.Assert(name.StartsWith(originalSimpleName.Identifier.ValueText, StringComparison.Ordinal)); 597if (identifier.ValueText == name && name.EndsWith("Attribute", StringComparison.Ordinal))
Simplification\Reducers\CSharpEscapingReducer.cs (3)
38var unescapedIdentifier = token.ValueText; 140? originalToken.CopyAnnotationsTo(SyntaxFactory.VerbatimIdentifier(originalToken.LeadingTrivia, unescapedText, originalToken.ValueText, originalToken.TrailingTrivia)) 141: originalToken.CopyAnnotationsTo(SyntaxFactory.Identifier(originalToken.LeadingTrivia, SyntaxKind.IdentifierToken, unescapedText, originalToken.ValueText, originalToken.TrailingTrivia));
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
412var symbols = semanticModel.LookupSymbols(expression.SpanStart, name: identifierName.Identifier.ValueText);
Simplification\Simplifiers\ExpressionSimplifier.cs (4)
167if (memberAccess.Name.Identifier.ValueText == ((IdentifierNameSyntax)replacementNode).Identifier.ValueText) 232? semanticModel.LookupSymbols(memberAccess.SpanStart, name: memberAccess.Name.Identifier.ValueText) 235? semanticModel.LookupNamespacesAndTypes(memberAccess.SpanStart, name: memberAccess.Name.Identifier.ValueText)
Simplification\Simplifiers\NameSimplifier.cs (5)
174if (qualifiedName3.Right.Identifier.ValueText == identifierToken.ValueText) 501if (identifierToken.ValueText != AttributeName && identifierToken.ValueText.EndsWith(AttributeName, StringComparison.Ordinal) && !identifierToken.HasAnnotation(SimplificationHelpers.DoNotSimplifyAnnotation)) 505var newAttributeName = identifierToken.ValueText[..^9];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
65var name = argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AttributeArgumentSyntaxExtensions.cs (1)
50var name = argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
166parts.Add(simpleName.Identifier.ValueText);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
45return typeParameters.HasValue && typeParameters.Value.Any(typeParameter => typeParameter.Identifier.ValueText == name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
34var identifier = syntaxToken.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (11)
67name = max.Name.Identifier.ValueText; 73name = qn.Right.Identifier.ValueText; 79name = aq.Name.Identifier.ValueText; 85name = gx.Identifier.ValueText; 91name = nx.Identifier.ValueText; 366return identifierName.Identifier.ValueText.ToCamelCase(); 370return memberAccess.Name.Identifier.ValueText.ToCamelCase(); 374return memberBinding.Name.Identifier.ValueText.ToCamelCase(); 391return name.Identifier.ValueText.ToCamelCase(); 396var word = foreachStatement.Identifier.ValueText.ToCamelCase(); 433return argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
67var simpleNameText = token.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (2)
359if (identifierName.Identifier.ValueText.Equals(FormattingDiagnosticIds.FormatDocumentControlDiagnosticId) 360|| identifierName.Identifier.ValueText.Equals(FormattingDiagnosticIds.FormattingDiagnosticId))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (3)
154@using.Alias.Name.Identifier.ValueText.AppendToAliasNameSet(builder); 285var type = model.Compilation.TryGetCallingConventionSymbol(syntax.Name.ValueText); 408=> model.Compilation.CreatePreprocessingSymbol(identifier.ValueText);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (6)
550name = simpleName.Identifier.ValueText; 888builder.Append(typeParameterList.Parameters[0].Identifier.ValueText); 892builder.Append(typeParameterList.Parameters[i].Identifier.ValueText); 1145=> (argument as ArgumentSyntax)?.NameColon?.Name.Identifier.ValueText ?? string.Empty; 1148=> (argument as AttributeArgumentSyntax)?.NameEquals?.Name.Identifier.ValueText ?? string.Empty; 1428xmlElement.StartTag.Name.LocalName.ValueText == DocumentationCommentXmlNames.ParameterElementName;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\CSharpInferredMemberNameSimplifier.cs (4)
32if (inferredName == null || inferredName != node.NameColon.Name.Identifier.ValueText) 53if (inferredName == null || inferredName != node.NameEquals.Name.Identifier.ValueText) 66var name = toRemove.NameColon.Name.Identifier.ValueText; 88var name = toRemove.NameEquals.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (5)
221paramNames.Add(originalParam.Identifier.ValueText); 245paramNames = [originalSimpleLambda.Parameter.Identifier.ValueText]; 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)); 669=> argument.NameColon.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (4)
27var token1IsSystem = x.ValueText == nameof(System); 28var token2IsSystem = y.ValueText == nameof(System); 55var string1 = x.ValueText; 56var string2 = y.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
301.Where(n => n is IdentifierNameSyntax id && id.Identifier.ValueText.Equals(identifier.ValueText))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
86var name1 = using1.Name.GetFirstToken().ValueText; 87var name2 = using2.Name.GetFirstToken().ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
135return Literal(token.LeadingTrivia, tokenText, token.ValueText, token.TrailingTrivia); 144return Literal(token.LeadingTrivia, tokenText, token.ValueText, token.TrailingTrivia);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
397comparisonResult = string.Compare(x.ValueText, y.ValueText, StringComparison.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
126if (numericLiteral.Token.ValueText == "1")
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1656identifierName.Identifier.ValueText == "var") 1696identifierName.Identifier.ValueText == "var")
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (2)
103return argument.NameColon.Name.Identifier.ValueText; 116return argument.NameEquals.Name.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
82valueText: discardSyntax.UnderscoreToken.ValueText,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (12)
714var name = argumentOpt != null && argumentOpt.NameColon != null ? argumentOpt.NameColon.Name.Identifier.ValueText : null; 747var name = argumentOpt != null && argumentOpt.NameColon != null ? argumentOpt.NameColon.Name.Identifier.ValueText : null; 1556elementNamesBuilder.Add(subPattern.NameColon?.Name.Identifier.ValueText); 1629.Where(p => p.Name == memberDeclarator.NameEquals.Name.Identifier.ValueText) 1800parameter.Identifier.ValueText, lambdaExpression.Body); 1809if (identifierName.Identifier.ValueText.Equals(parameterName) && 2204if (descendant.Identifier.ValueText != symbol.Name) 2230parenthesizedVariableDesignation.Variables.All(v => v is SingleVariableDesignationSyntax { Identifier.ValueText: not "" })) 2232var elementNames = parenthesizedVariableDesignation.Variables.SelectAsArray(v => ((SingleVariableDesignationSyntax)v).Identifier.ValueText); 2300elementNamesBuilder.Add(name.Identifier.ValueText == "" ? null : 2301name.Identifier.ValueText); 2330var name = singleVariable.Identifier.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (5)
23if (SyntaxFacts.GetKeywordKind(syntaxToken.ValueText) == SyntaxKind.None && SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.None) 28if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken) 42syntaxToken.ValueText == "global") 52syntaxToken.ValueText,
Microsoft.CodeAnalysis.EditorFeatures (1)
DocumentationComments\AbstractXmlTagCompletionCommandHandler.cs (1)
179if (token.ValueText == expectedEndTagText)
Microsoft.CodeAnalysis.Features (44)
AddImport\SymbolReferenceFinder.cs (1)
312var name = nameNode.GetFirstToken().ValueText;
AddImport\SymbolResult.cs (2)
38NameNode.GetFirstToken().ValueText != DesiredName; 45NameNode.GetFirstToken().ValueText, DesiredName);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
151if (name == iterationVariable.ValueText)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (2)
143var value = piece.GetFirstToken().Value?.ToString() ?? piece.GetFirstToken().ValueText; 247var existingValue = interpolatedStringTextNode.GetFirstToken().ValueText;
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
312int.TryParse(literalExpression.GetFirstToken().ValueText, out var index) &&
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
94var valueText = literalExpression.GetFirstToken().ValueText;
EmbeddedLanguages\AbstractLanguageDetector.cs (1)
147return syntaxFacts.GetIdentifierOfSimpleName(typeNode).ValueText;
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (2)
122return syntaxFacts.GetIdentifierOfSimpleName(syntaxFacts.GetNameOfMemberAccessExpression(invokedExpression)).ValueText; 128return syntaxFacts.GetIdentifierOfSimpleName(invokedExpression).ValueText;
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
504return syntaxFacts.GetIdentifierOfSimpleName(typeNode).ValueText;
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
127varDeclName = _syntaxFacts.GetIdentifierOfVariableDeclarator(declarator).ValueText;
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (2)
217if (syntaxFacts.GetIdentifierOfSimpleName(name).ValueText != nameof(IDisposable.Dispose)) 355var identifierName = syntaxFactsService.GetIdentifierOfSimpleName(node).ValueText;
RelatedDocuments\AbstractRelatedDocumentsService.cs (2)
120if (nameToken.ValueText == "") 127if (!seenTypeNames.Add(nameToken.ValueText))
Shared\Extensions\SyntaxTokenListExtensions.cs (2)
25return tokens[0].ValueText; 31pooledBuilder.Builder.Append(token.ValueText);
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (1)
39return [new SnippetPlaceholder(identifier.ValueText, identifier.SpanStart)];
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (4)
76var nameText = token.ValueText; 97var nameText = token.ValueText; 137var nameText = nameToken.ValueText; 172var nameText = nameToken.ValueText;
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
161var variableName = syntaxFacts.GetIdentifierOfVariableDeclarator(declarator).ValueText;
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (2)
164if (!seenNames.Add(identifier.ValueText)) 168statement, leftMemberAccess, rightExpression, typeMember?.Name ?? identifier.ValueText));
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
165&& syntaxFacts.GetIdentifierOfSimpleName(nameOfMemberAccessExpression).ValueText 173return syntaxFacts.GetIdentifierOfSimpleName(expression).ValueText
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (2)
45name: _state.IdentifierToken.ValueText, 58CodeFixesResources.Generate_enum_member_0, _state.IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
61var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
144if (string.IsNullOrWhiteSpace(IdentifierToken.ValueText))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
54var name = state.IdentifierToken.ValueText;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
82.GetMembers(IdentifierToken.ValueText)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (3)
81name: _state.IdentifierToken.ValueText, 99name: _state.IdentifierToken.ValueText); 193_state.IdentifierToken.ValueText);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
129if (state.IdentifierToken.ValueText.StartsWith("_"))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
144var existingMembers = TypeToGenerateIn.GetMembers(IdentifierToken.ValueText) 245if (string.IsNullOrWhiteSpace(identifierToken.ValueText)) 437name: IdentifierToken.ValueText, cancellationToken: cancellationToken);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
240var parentMemberAccessExpressionName = syntaxFacts.GetIdentifierOfSimpleName(parentMemberAccessExpressionNameNode).ValueText;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
941_usedNames.Add(nameToken.ValueText);
Microsoft.CodeAnalysis.VisualBasic (30)
Binding\Binder_AnonymousTypes.vb (1)
167fieldName = fieldNameToken.ValueText
Binding\Binder_Expressions.vb (1)
514Dim name As String = nameToken.ValueText
Binding\Binder_Query.vb (6)
2272If right.ValueText.Length > 0 Then 2827rangeVarName = rangeVarNameSyntax.ValueText 2849rangeVarName = rangeVarNameSyntax.ValueText 4024rangeVarName = rangeVarNameSyntax.ValueText 4034rangeVarName = rangeVarNameSyntax.ValueText 4038rangeVarName = rangeVarNameSyntax.ValueText
Binding\Binder_Statements.vb (3)
928Dim labelName = labelToken.ValueText 1768Dim name = identifier.ValueText 1778Lookup(result, identifier.ValueText, 0, Nothing, useSiteInfo:=CompoundUseSiteInfo(Of AssemblySymbol).Discarded)
Binding\Binder_Symbols.vb (5)
843Dim idText As String = idSyntax.ValueText 877Dim idText As String = idSyntax.ValueText 972rightIdentToken.ValueText, 987rightIdentToken.ValueText, 1070rightIdentSyntax.ValueText,
Binding\Binder_XmlLiterals.vb (2)
949Return token.ValueText 1301Return token.ValueText
Binding\DocumentationCommentCrefBinder.vb (1)
51If Not identifier.IsBracketed AndAlso IsIntrinsicTypeForDocumentationComment(SyntaxFacts.GetKeywordKind(identifier.ValueText)) Then
Binding\DocumentationCommentCrefBinder_Compat.vb (1)
317Dim identifierName As String = identifier.ValueText
Binding\ExecutableCodeBinder.vb (1)
103Dim name As String = labelName.ValueText
Symbols\Source\SourceFieldSymbol.vb (1)
883Dim fieldName As String = variableName.ValueText
Symbols\Source\SourceLabelSymbol.vb (1)
26MyBase.New(labelNameToken.ValueText)
Symbols\Source\SourcePropertySymbol.vb (1)
239Dim name = identifier.ValueText
Syntax\SyntaxExtensions.vb (1)
126Return If(nameToken.Kind() = SyntaxKind.IdentifierToken, nameToken.ValueText, Nothing)
Syntax\SyntaxFactory.vb (2)
924Return Token(rewrittenToken.LeadingTrivia, SyntaxKind.LessThanToken, rewrittenToken.TrailingTrivia, rewrittenToken.ValueText) 928Return Token(rewrittenToken.LeadingTrivia, SyntaxKind.GreaterThanToken, rewrittenToken.TrailingTrivia, rewrittenToken.ValueText)
Syntax\SyntaxNormalizer.vb (2)
167If newToken.TrailingTrivia.Count = 0 AndAlso IsNewLineChar(newToken.ValueText.Last) Then 599String.IsNullOrEmpty(nextToken.ValueText) Then
Syntax\VisualBasicWarningStateMap.vb (1)
86accumulatedSpecificWarningState = accumulatedSpecificWarningState.SetItem(currentCode.Identifier.ValueText, reportingState)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (22)
src\Analyzers\VisualBasic\Analyzers\ValidateFormatString\VisualBasicValidateFormatStringDiagnosticAnalyzer.vb (1)
27If Not simpleArgumentSyntax Is Nothing AndAlso simpleArgumentSyntax.NameColonEquals?.Name.Identifier.ValueText.Equals(searchArgumentName) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
49Dim name = namedArgument.NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (4)
426name = memberAccess.Name.Identifier.ValueText 431name = qualifiedName.Right.Identifier.ValueText 436name = genericName.Identifier.ValueText 441name = identifierName.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (3)
211Return (DirectCast(current, IdentifierNameSyntax)).Identifier.ValueText.ToCamelCase() 213Return (DirectCast(current, MemberAccessExpressionSyntax)).Name.Identifier.ValueText.ToCamelCase() 247Return simpleArgument.NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (1)
123Dim aliasSymbol = compilation.AliasImports.FirstOrDefault(Function(a) a.Name = clause.Alias.Identifier.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
308Return model.Compilation.CreatePreprocessingSymbol(token.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (3)
528name = simpleName.Identifier.ValueText 1183Return DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText 1637Return name?.LocalName.ValueText = DocumentationCommentXmlNames.ParameterElementName
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Simplification\VisualBasicInferredMemberNameSimplifier.vb (4)
26Not CaseInsensitiveComparison.Equals(inferredName, node.NameColonEquals.Name.Identifier.ValueText) Then 45Not CaseInsensitiveComparison.Equals(inferredName, node.Name.Identifier.ValueText) Then 54Dim name = toRemove.NameColonEquals.Name.Identifier.ValueText 71Dim name = toRemove.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsOrganizer.vb (2)
61Dim name1 = simpleClause1.Name.GetFirstToken().ValueText 62Dim name2 = simpleClause2.Name.GetFirstToken().ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (2)
288paramNames.Add(originalParam.Identifier.Identifier.ValueText) 479Return DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (15)
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (1)
162Return arguments.SelectAsArray(Function(a) New Argument(RefKind.None, TryCast(a, SimpleArgumentSyntax)?.NameColonEquals?.Name.Identifier.ValueText, a.GetArgumentExpression()))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
93If numericLiteral.Token.ValueText = "1" Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicDeclarationComparer.vb (2)
391comparisonResult = CaseInsensitiveComparison.Compare(x.ValueText, y.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (2)
206For Each conflictingSymbol In _importedTypesAndNamespaces.Item((node.Identifier.ValueText, node.Arity)) 210For Each conflictingSymbol In _importedMembers.Item(node.Identifier.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (2)
82parts.Add(simpleName.Identifier.ValueText) 296Dim identifierValue = SyntaxFacts.MakeHalfWidthIdentifier(identifier.Identifier.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
97Return DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
393.Where(Function(p) p.Name = simpleArgument.NameColonEquals.Name.Identifier.ValueText) 962Dim parameterName = parameter.Identifier.Identifier.ValueText 985If CaseInsensitiveComparison.Equals(parameterName, identifier.Identifier.ValueText) AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\VisualBasicSimplificationHelpers.vb (3)
11If identifierToken.Kind <> SyntaxKind.IdentifierToken OrElse identifierToken.ValueText.Length = 0 Then 23Dim unescapedIdentifier = identifierToken.ValueText 29SyntaxFactory.BracketedIdentifier(identifierToken.LeadingTrivia, identifierToken.ValueText, identifierToken.TrailingTrivia) _
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (4)
187Dim hasValidToken = pairToken.Kind <> SyntaxKind.None AndAlso Not pairToken.IsMissing AndAlso token.ValueText = pairToken.ValueText 231Return pairToken.Kind <> SyntaxKind.None AndAlso Not pairToken.IsMissing AndAlso token.ValueText = pairToken.ValueText
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\WinRTCollectionTests.vb (1)
6363Dim add = tree.GetRoot().DescendantNodes().Where(Function(n) n.Kind() = SyntaxKind.IdentifierName AndAlso DirectCast(n, IdentifierNameSyntax).Identifier.ValueText = "Add").Single()
Microsoft.CodeAnalysis.VisualBasic.Features (43)
ChangeSignature\UnifiedArgumentSyntax.vb (1)
41DirectCast(_argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText,
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (6)
207actualEventName = CType(eventExpression, IdentifierNameSyntax).Identifier.ValueText 271Dim actualEventName = node.Right.Identifier.ValueText 369If semanticModel.LookupSymbols(handlesClauseItem.SpanStart, container:=targetType, name:=handlesClauseItem.EventMember.Identifier.ValueText). 370Any(Function(x) x.MatchesKind(SymbolKind.Event) AndAlso x.Name = handlesClauseItem.EventMember.Identifier.ValueText) Then 375If targetType.GetMembers(handlesClauseItem.EventMember.Identifier.ValueText).Any() Then 387Dim actualEventName = handlesClauseItem.EventMember.Identifier.ValueText
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceKeywordCodeAction.vb (1)
34Return String.Format(FeaturesResources.Change_0_to_1, _invalidToken.ValueText, SyntaxFacts.GetText(BlockKindToKeywordKind(_createBlockKind)))
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceTokenKeywordCodeAction.vb (1)
28Return String.Format(FeaturesResources.Change_0_to_1, _invalidToken.ValueText, SyntaxFacts.GetText(BlockKindToKeywordKind(_blockKind)))
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.ReferenceRewriter.vb (2)
39If Not CaseInsensitiveComparison.Equals(node.Identifier.ValueText, _definition.Identifier.ValueText) Then
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
144If xmlName?.LocalName.ValueText = "cref" AndAlso xmlValue?.StartQuoteToken = token Then
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (9)
91If name?.LocalName.ValueText = CrefAttributeName AndAlso Not token = value?.EndQuoteToken Then 214If Not nameToken.IsMissing AndAlso nameToken.ValueText.Length > 0 Then 215Return SpecializedCollections.SingletonEnumerable(CreateCompletionItem(nameToken.ValueText, beforeCaretText:=nameToken.ValueText & ">", afterCaretText:=String.Empty)) 222Return DirectCast(DirectCast(element, XmlElementSyntax).StartTag.Name, XmlNameSyntax).LocalName.ValueText 248Dim tagName = tagNameSyntax.LocalName.ValueText 325Return (nameSyntax?.LocalName.ValueText, attributes) 334Return TryCast(attribute, XmlNameAttributeSyntax)?.Reference?.Identifier.ValueText 350Return nameSyntax?.LocalName.ValueText
Debugging\ProximityExpressionsGetter.Worker.vb (2)
112_additionalTerms.Add(p.Identifier.Identifier.ValueText) 124_additionalTerms.Add(catchBlock.CatchStatement.IdentifierName.Identifier.ValueText)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (5)
114If Not String.IsNullOrEmpty(identifierName.Identifier.ValueText) Then 115aliasedNames = aliasedNames.Add(identifierName.Identifier.ValueText) 154Dim canTrySimplify = CaseInsensitiveComparison.EndsWith(node.Identifier.ValueText, "Attribute") 158canTrySimplify = CanReplaceIdentifierWithAlias(node.Identifier.ValueText) _ 159OrElse CanReplaceIdentifierWithPredefinedType(node.Identifier.ValueText)
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
172existingCommentText = firstXmlText.TextTokens.First().ValueText
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.ExpressionCodeGenerator.vb (1)
53Dim name = identifierNode.Identifier.ValueText
GenerateType\VisualBasicGenerateTypeService.vb (3)
527namespaceContainers.Add(DirectCast(name, QualifiedNameSyntax).Right.Identifier.ValueText) 529namespaceContainers.Add(DirectCast(name, SimpleNameSyntax).Identifier.ValueText) 532namespaceContainers.Add(DirectCast(name, GlobalNameSyntax).GlobalKeyword.ValueText)
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (1)
206Return name?.Prefix Is Nothing AndAlso name?.LocalName.ValueText = "value"
SignatureHelp\CollectionInitializerSignatureHelpProvider.vb (2)
39token.ValueText.Length = 1 AndAlso 40IsTriggerCharacter(token.ValueText(0)) AndAlso
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
67name:=functionAggregation.FunctionName.ValueText,
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
84Dim name As String = genericName.Identifier.ValueText
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (2)
84semanticModel.LookupStaticMembers(raiseEventStatement.SpanStart, containingType, raiseEventStatement.Name.Identifier.ValueText), 85semanticModel.LookupSymbols(raiseEventStatement.SpanStart, containingType, raiseEventStatement.Name.Identifier.ValueText))
SignatureHelp\SignatureHelpUtilities.vb (1)
43simpleArgument.NameColonEquals.Name.Identifier.ValueText,
src\Analyzers\VisualBasic\Analyzers\ValidateFormatString\VisualBasicValidateFormatStringDiagnosticAnalyzer.vb (1)
27If Not simpleArgumentSyntax Is Nothing AndAlso simpleArgumentSyntax.NameColonEquals?.Name.Identifier.ValueText.Equals(searchArgumentName) Then
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (1)
162Return arguments.SelectAsArray(Function(a) New Argument(RefKind.None, TryCast(a, SimpleArgumentSyntax)?.NameColonEquals?.Name.Identifier.ValueText, a.GetArgumentExpression()))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (11)
Diagnostics\DiagnosticAnalyzerTests.vb (2)
41If id.Identifier.ValueText.StartsWith("x", StringComparison.Ordinal) Then 42context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_CA9999_UseOfVariableThatStartsWithX, id.GetLocation, id.Identifier.ValueText))
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.vb (8)
43Return DirectCast(value, ClassStatementSyntax).Identifier.ValueText = name 287Sub(_step) Assert.True(DirectCast(_step.Outputs.Single().Value, MethodStatementSyntax).Identifier.ValueText = "M")) 316Sub(_step) Assert.True(DirectCast(_step.Outputs.Single().Value, MethodStatementSyntax).Identifier.ValueText = "M")) 345Sub(_step) Assert.True(DirectCast(_step.Outputs.Single().Value, ModifiedIdentifierSyntax).Identifier.ValueText = "a")) 375Sub(v) Assert.True(DirectCast(v.Value, ModifiedIdentifierSyntax).Identifier.ValueText = "a"), 376Sub(v) Assert.True(DirectCast(v.Value, ModifiedIdentifierSyntax).Identifier.ValueText = "b"))) 406Sub(v) Assert.True(DirectCast(v.Value, ModifiedIdentifierSyntax).Identifier.ValueText = "a"), 407Sub(v) Assert.True(DirectCast(v.Value, ModifiedIdentifierSyntax).Identifier.ValueText = "b")))
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.vb (1)
21Return DirectCast(value, ClassStatementSyntax).Identifier.ValueText = name
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
DocumentationComments\DocCommentTests.vb (1)
12090If token.ValueText = textToFind Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (13)
Parser\ParseAttributes.vb (1)
48Assert.Equal(If(isFullWidth, FULLWIDTH_COLON_STRING, ":"), target.ColonToken.ValueText)
Parser\ParseDirectives.vb (4)
1655Assert.Equal("_789", enableNode.ErrorCodes(1).Identifier.ValueText) 1664Assert.Equal("BC41008", disableNode.ErrorCodes(1).Identifier.ValueText) 2120Assert.Equal("Dim", enableNode.ErrorCodes(0).Identifier.ValueText) 2146Assert.Equal("Dim", enableNode.ErrorCodes(0).Identifier.ValueText)
Parser\ParseExpression.vb (1)
1046Assert.Equal("<", el.Content.First.ChildNodesAndTokens(1).AsToken.ValueText)
Scanner\ScannerTests.vb (4)
1847Assert.Equal("Goo123", tk.ValueText) 1855Assert.Equal("__", tk.ValueText) 1884Assert.Equal("Hello, World!", tk.ValueText) 1897Assert.Equal("Hello," & vbLf & "World!", token.ValueText)
Syntax\SyntaxTokenFactoryTests.vb (1)
170Assert.Equal("a", id.ValueText)
TestSyntaxNodes.vb (2)
847Assert.Equal("ParTIAL", keyword.ValueText()) 855Assert.Equal("goo", identifier.ValueText)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (101)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (7)
82If Not String.IsNullOrEmpty(name) AndAlso name <> token.ValueText Then 84Debug.Assert(name.Equals(token.ValueText, StringComparison.OrdinalIgnoreCase)) 174If identifier IsNot Nothing AndAlso Me._aliasSet.Value.Contains(identifier.Identifier.ValueText) Then 191If namesMustBeEqualIgnoringCase AndAlso Not String.Equals(symbol.Name, token.ValueText, StringComparison.OrdinalIgnoreCase) Then 217If String.Equals(token.ValueText & s_attributeSuffix, symbol.Name, StringComparison.OrdinalIgnoreCase) Then 239If symbol.Name = token.ValueText Then 244If symbol.Name = token.ValueText & s_attributeSuffix Then
Classification\SyntaxClassification\IdentifierNameSyntaxClassifier.vb (1)
24If CaseInsensitiveComparison.Equals(identifier.ValueText, s_awaitText) Then
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (1)
120Select Case id.ValueText.ToUpperInvariant()
CodeGeneration\VisualBasicSyntaxGenerator.vb (22)
1121Return name.Identifier.ValueText 1126Return gname.Identifier.ValueText & "_" & gname.TypeArgumentList.Arguments.Select(Function(t) GetNameAsIdentifier(t)).Aggregate(Function(a, b) a & "_" & b) 1396Return DirectCast(EnumMember(id.Identifier.ValueText), EnumMemberDeclarationSyntax) 1402Return DirectCast(EnumMember(vd.Names(0).Identifier.ValueText, vd.Initializer.Value), EnumMemberDeclarationSyntax) 1956Return DirectCast(declaration, ClassBlockSyntax).BlockStatement.Identifier.ValueText 1958Return DirectCast(declaration, StructureBlockSyntax).BlockStatement.Identifier.ValueText 1960Return DirectCast(declaration, InterfaceBlockSyntax).BlockStatement.Identifier.ValueText 1962Return DirectCast(declaration, EnumBlockSyntax).EnumStatement.Identifier.ValueText 1964Return DirectCast(declaration, EnumMemberDeclarationSyntax).Identifier.ValueText 1967Return DirectCast(declaration, DelegateStatementSyntax).Identifier.ValueText 1970Return DirectCast(declaration, MethodBlockSyntax).SubOrFunctionStatement.Identifier.ValueText 1973Return DirectCast(declaration, MethodStatementSyntax).Identifier.ValueText 1975Return DirectCast(declaration, PropertyBlockSyntax).PropertyStatement.Identifier.ValueText 1977Return DirectCast(declaration, PropertyStatementSyntax).Identifier.ValueText 1979Return DirectCast(declaration, EventBlockSyntax).EventStatement.Identifier.ValueText 1981Return DirectCast(declaration, EventStatementSyntax).Identifier.ValueText 1983Return DirectCast(declaration, EventStatementSyntax).Identifier.ValueText 1985Return DirectCast(declaration, ParameterSyntax).Identifier.Identifier.ValueText 1992Return fd.Declarators(0).Names(0).Identifier.ValueText 1998Return ld.Declarators(0).Names(0).Identifier.ValueText 2004Return vd.Names(0).Identifier.ValueText 2008Return DirectCast(declaration, ModifiedIdentifierSyntax).Identifier.ValueText
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (11)
72aliasMap(simpleImport.Alias.Identifier.ValueText) = mappedName 119Return simpleName.Identifier.ValueText 160blockStatement.Identifier.ValueText, 187enumStatement.Identifier.ValueText, Nothing, 223typeBlock.BlockStatement.Identifier.ValueText, 241delegateDecl.Identifier.ValueText, 256enumMember.Identifier.ValueText, Nothing, 270eventDecl.Identifier.ValueText, Nothing, 285funcDecl.Identifier.ValueText, 303propertyDecl.Identifier.ValueText, 320modifiedIdentifier.Identifier.ValueText, Nothing,
Rename\VisualBasicRenameRewriterLanguageService.vb (9)
307Dim prefix = If(isRenameLocation AndAlso Me._renameLocations(token.Span).IsRenamableAccessor, newToken.ValueText.Substring(0, newToken.ValueText.IndexOf("_"c) + 1), String.Empty) 440Dim isOldText = CaseInsensitiveComparison.Equals(oldToken.ValueText, _originalText) 443CaseInsensitiveComparison.Equals(oldToken.ValueText, _replacementText) OrElse 444IsPossibleNameConflict(_possibleNameConflicts, oldToken.ValueText) 525Dim oldIdentifier = newToken.ValueText 555valueText = DirectCast(name, IdentifierNameSyntax).Identifier.ValueText 644ElseIf newToken.Kind = SyntaxKind.XmlNameToken AndAlso CaseInsensitiveComparison.Equals(oldToken.ValueText, _originalText) Then 1001valueText = DirectCast(name, IdentifierNameSyntax).Identifier.ValueText
Simplification\Reducers\VisualBasicEscapingReducer.vb (3)
34Dim unescapedIdentifier = identifier.ValueText 213originalToken.CopyAnnotationsTo(SyntaxFactory.BracketedIdentifier(originalToken.LeadingTrivia, originalToken.ValueText, originalToken.TrailingTrivia)), 214originalToken.CopyAnnotationsTo(SyntaxFactory.Identifier(originalToken.LeadingTrivia, originalToken.ValueText, originalToken.TrailingTrivia)))
Simplification\Simplifiers\ExpressionSimplifier.vb (2)
123If memberAccess.Name.Identifier.ValueText = identifierToken.ValueText Then
Simplification\Simplifiers\NameSimplifier.vb (6)
111If qualifiedName.Right.Identifier.ValueText = identifierToken.ValueText Then 169Dim valueText = TryCast(name, IdentifierNameSyntax)?.Identifier.ValueText 365String.Compare(aliasSymbol.Name, identifierToken.ValueText, StringComparison.OrdinalIgnoreCase) = 0 Then 374newIdentifierText = identifierToken.ValueText + "Attribute" 375ElseIf identifierToken.ValueText.TryReduceAttributeSuffix(newIdentifierText) Then
Simplification\VisualBasicSimplificationService.Expander.vb (4)
358elementName = argument.NameColonEquals.Name.Identifier.ValueText 577Debug.Assert(name.StartsWith(originalSimpleName.Identifier.ValueText, StringComparison.Ordinal)) 583If identifier.ValueText <> newName Then 590If identifier.ValueText = name Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
49Dim name = namedArgument.NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (4)
426name = memberAccess.Name.Identifier.ValueText 431name = qualifiedName.Right.Identifier.ValueText 436name = genericName.Identifier.ValueText 441name = identifierName.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (3)
211Return (DirectCast(current, IdentifierNameSyntax)).Identifier.ValueText.ToCamelCase() 213Return (DirectCast(current, MemberAccessExpressionSyntax)).Name.Identifier.ValueText.ToCamelCase() 247Return simpleArgument.NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicUnnecessaryImportsProvider.vb (1)
123Dim aliasSymbol = compilation.AliasImports.FirstOrDefault(Function(a) a.Name = clause.Alias.Identifier.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
308Return model.Compilation.CreatePreprocessingSymbol(token.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (3)
528name = simpleName.Identifier.ValueText 1183Return DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText 1637Return name?.LocalName.ValueText = DocumentationCommentXmlNames.ParameterElementName
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Simplification\VisualBasicInferredMemberNameSimplifier.vb (4)
26Not CaseInsensitiveComparison.Equals(inferredName, node.NameColonEquals.Name.Identifier.ValueText) Then 45Not CaseInsensitiveComparison.Equals(inferredName, node.Name.Identifier.ValueText) Then 54Dim name = toRemove.NameColonEquals.Name.Identifier.ValueText 71Dim name = toRemove.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsOrganizer.vb (2)
61Dim name1 = simpleClause1.Name.GetFirstToken().ValueText 62Dim name2 = simpleClause2.Name.GetFirstToken().ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\SpeculationAnalyzer.vb (2)
288paramNames.Add(originalParam.Identifier.Identifier.ValueText) 479Return DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
93If numericLiteral.Token.ValueText = "1" Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicDeclarationComparer.vb (2)
391comparisonResult = CaseInsensitiveComparison.Compare(x.ValueText, y.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (2)
206For Each conflictingSymbol In _importedTypesAndNamespaces.Item((node.Identifier.ValueText, node.Arity)) 210For Each conflictingSymbol In _importedMembers.Item(node.Identifier.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (2)
82parts.Add(simpleName.Identifier.ValueText) 296Dim identifierValue = SyntaxFacts.MakeHalfWidthIdentifier(identifier.Identifier.ValueText)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
97Return DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.Identifier.ValueText
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
393.Where(Function(p) p.Name = simpleArgument.NameColonEquals.Name.Identifier.ValueText) 962Dim parameterName = parameter.Identifier.Identifier.ValueText 985If CaseInsensitiveComparison.Equals(parameterName, identifier.Identifier.ValueText) AndAlso
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\VisualBasicSimplificationHelpers.vb (3)
11If identifierToken.Kind <> SyntaxKind.IdentifierToken OrElse identifierToken.ValueText.Length = 0 Then 23Dim unescapedIdentifier = identifierToken.ValueText 29SyntaxFactory.BracketedIdentifier(identifierToken.LeadingTrivia, identifierToken.ValueText, identifierToken.TrailingTrivia) _
Microsoft.CodeAnalysis.Workspaces (22)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
162=> syntaxFacts.IsIdentifier(token) && syntaxFacts.TextMatch(token.ValueText, name);
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (3)
109if (!ValidateAndSplitDocumentationCommentId(token.ValueText, out var prefix, out var docCommentId)) 172var text = token.ValueText; 216var valueText = token.ValueText;
FindSymbols\FindReferences\FindReferenceCache.cs (2)
104if (_aliasNameSet.Contains(token.ValueText)) 150=> !token.IsMissing && this.SyntaxFacts.IsIdentifier(token) && this.SyntaxFacts.TextMatch(token.ValueText, identifier);
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (5)
124var valueText = token.ValueText; 143stringLiterals.Add(token.ValueText); 229var identifierName = identifier.ValueText; 292var identifierName = identifier.ValueText; 328aliasInfo.Add((alias.ValueText, name, arity, isGlobal: globalToken != default));
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
305var namespaceName = GetIdentifier(nameSyntax).ValueText;
ReassignedVariable\AbstractReassignedVariableService.cs (1)
322if (!syntaxFacts.StringComparer.Equals(idToken.ValueText, localOrParameter.Name))
Rename\ConflictEngine\ConflictingIdentifierTracker.cs (4)
23if (token.IsMissing || token.ValueText == null) 28var name = token.ValueText; 66if (token.IsMissing || token.ValueText == null) 71var name = token.ValueText;
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
219token.ValueText == referencedSymbol.Name)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
78var expectedValueText = token.ValueText;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\IVirtualCharService.cs (2)
30/// char of the tokens <see cref="SyntaxToken.ValueText"/>. In other words, for each char 59/// token's <see cref="SyntaxToken.ValueText"/>.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
220var name = syntaxFacts.GetIdentifierOfSimpleName(left).ValueText;
Microsoft.CodeAnalysis.Workspaces.UnitTests (17)
BatchFixAllProviderTests.cs (1)
72if (node.Token.ValueText == "0")
CodeCleanup\CodeCleanupTests.cs (1)
353root = root.ReplaceToken(previousToken, CSharp.SyntaxFactory.Identifier(previousToken.LeadingTrivia, previousToken.ValueText, previousToken.TrailingTrivia));
SyntaxPathTests.cs (15)
164Assert.Equal("M1", ((MethodDeclarationSyntax)n1).Identifier.ValueText); 167Assert.Equal("M2", ((MethodDeclarationSyntax)n2).Identifier.ValueText); 170Assert.Equal("M3", ((MethodDeclarationSyntax)n3).Identifier.ValueText); 197Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 199Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText); 232Assert.Equal("M1", ((MethodDeclarationSyntax)n1).Identifier.ValueText); 235Assert.Equal("M2", ((MethodDeclarationSyntax)n2).Identifier.ValueText); 262Assert.Equal("D", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 293Assert.Equal("D", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 321Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 323Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText); 350Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 352Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText); 389Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 391Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText);
Microsoft.DotNet.GenFacades (9)
NotSupportedAssemblyGenerator.cs (6)
122if (node.Identifier.ValueText == "Dispose" || node.Identifier.ValueText == "Finalize") 210return parent + "." + node.Identifier.ValueText.Trim(); 215private string GetMethodDefinition(MethodDeclarationSyntax node) => GetFullyQualifiedName((TypeDeclarationSyntax)node.Parent) + "." + node.Identifier.ValueText; 217private string GetPropertyDefinition(PropertyDeclarationSyntax node) => GetFullyQualifiedName((TypeDeclarationSyntax)node.Parent) + "." + node.Identifier.ValueText; 219private string GetEventDefinition(EventDeclarationSyntax node) => GetFullyQualifiedName((TypeDeclarationSyntax)node.Parent) + "." + node.Identifier.ValueText;
TypeParser.cs (3)
85fullyQualifiedName = GetFullyQualifiedName((BaseTypeDeclarationSyntax)item.Parent, item.Identifier.ValueText.Trim()); 108string typeName = type.Identifier.ValueText; 119string typeName = type.Identifier.ValueText;
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
537Keyword = classDec.Keyword.ValueText, 555Keyword = parentLoggerClass.Keyword.ValueText,
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
183_ => type.Keyword.ValueText,
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (2)
320Keyword = typeDec.Keyword.ValueText, 341Keyword = parentLoggerClass.Keyword.ValueText,
Microsoft.Gen.Metrics (2)
Parser.cs (2)
139Keyword = typeDeclaration.Keyword.ValueText, 161Keyword = parentMetricClass.Keyword.ValueText,
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
139Keyword = typeDeclaration.Keyword.ValueText, 161Keyword = parentMetricClass.Keyword.ValueText,
Microsoft.Interop.ComInterfaceGenerator (1)
VirtualMethodPointerStubGenerator.cs (1)
161methodStub.CallingConvention.Array.Select(callConv => TypeOfExpression(TypeSyntaxes.CallConv(callConv.Name.ValueText)))))))
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
384LibraryImportData pinvokeData = stub.LibraryImportData with { EntryPoint = stub.LibraryImportData.EntryPoint ?? userDeclaredMethod.Identifier.ValueText };
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
278LibraryImportData pinvokeData = stub.LibraryImportData with { EntryPoint = stub.LibraryImportData.EntryPoint ?? userDeclaredMethod.Identifier.ValueText };
Microsoft.ML.AutoML (1)
Utils\Entity.cs (1)
137return new StringEntity(i.Identifier.ValueText);
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
45string nameArgValue = (nameArg.Expression as LiteralExpressionSyntax)?.Token.ValueText;
Microsoft.VisualStudio.LanguageServices.CSharp (15)
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (11)
37builder.Append(((IdentifierNameSyntax)name).Identifier.ValueText); 43builder.Append(genericName.Identifier.ValueText); 71builder.Append(((PredefinedTypeSyntax)type).Keyword.ValueText); 177builder.Append(typeDeclaration.Identifier.ValueText); 183builder.Append(enumDeclaration.Identifier.ValueText); 188builder.Append(delegateDeclaration.Identifier.ValueText); 194builder.Append(enumMemberDeclaration.Identifier.ValueText); 199builder.Append(variableDeclarator.Identifier.ValueText); 204builder.Append(methodDeclaration.Identifier.ValueText); 241builder.Append(propertyDeclaration.Identifier.ValueText); 246builder.Append(eventDeclaration.Identifier.ValueText);
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
510GenerateName(memberAccessExpression.Name.Identifier.ValueText);
LanguageService\CSharpHelpContextService.cs (3)
414else if (token.ValueText is "notnull" or "unmanaged") 418text = Keyword(token.ValueText); 525if (token.ValueText == "var" && token.IsKind(SyntaxKind.IdentifierToken) &&
Microsoft.VisualStudio.LanguageServices.VisualBasic (20)
CodeModel\MethodXML\MethodXmlBuilder.vb (2)
357Dim name = If(symbolOpt IsNot Nothing, symbolOpt.Name, memberAccess.Name.Identifier.ValueText) 409Dim name = If(symbolOpt IsNot Nothing, symbolOpt.Name, identifierName.Identifier.ValueText)
CodeModel\VisualBasicCodeModelService.NodeNameGenerator.vb (14)
32builder.Append(DirectCast(name, IdentifierNameSyntax).Identifier.ValueText) 37builder.Append(genericName.Identifier.ValueText) 140builder.Append(typeStatement.Identifier.ValueText) 148builder.Append(enumBlock.EnumStatement.Identifier.ValueText) 154builder.Append(delegateStatement.Identifier.ValueText) 161builder.Append(enumMemberDeclaration.Identifier.ValueText) 165builder.Append(modifiedIdentifier.Identifier.ValueText) 172builder.Append(methodStatement.Identifier.ValueText) 183builder.Append(methodStatement.Identifier.ValueText) 194builder.Append(declareStatement.Identifier.ValueText) 221builder.Append(propertyStatement.Identifier.ValueText) 234builder.Append(propertyStatement.Identifier.ValueText) 248builder.Append(eventStatement.Identifier.ValueText) 261builder.Append(eventStatement.Identifier.ValueText)
Help\VisualBasicHelpContextService.Visitor.vb (4)
73result = Keyword(node.AddHandlerOrRemoveHandlerKeyword.ValueText) 98result = Keyword(node.BlockKeyword.ValueText) 677result = Keyword(node.Keyword.ValueText) 934result = Keyword(node.OperatorToken.ValueText)
System.Private.CoreLib.Generators (4)
EventSourceGenerator.Parser.cs (1)
45string className = classDef.Identifier.ValueText;
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (3)
250if (binaryExpression.OperatorToken is SyntaxToken operatorToken && operatorToken.ValueText == "&&") 323if (binaryExpression.OperatorToken is SyntaxToken operatorToken && operatorToken.ValueText == "&&") 337else if (binaryExpression.OperatorToken is SyntaxToken operatorToken2 && operatorToken2.ValueText == "||")
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Parser.cs (4)
206typeDec is RecordDeclarationSyntax rds ? $"{typeDec.Keyword.ValueText} {rds.ClassOrStructKeyword}" : typeDec.Keyword.ValueText, 233parent is RecordDeclarationSyntax rds2 ? $"{parent.Keyword.ValueText} {rds2.ClassOrStructKeyword}" : parent.Keyword.ValueText,
System.Windows.Forms.Analyzers.CSharp (3)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (3)
114Name.Identifier.ValueText: "Initialize", 118Name.Identifier.ValueText: "ApplicationConfiguration" 125Identifier.ValueText: "ApplicationConfiguration"
System.Windows.Forms.PrivateSourceGenerators (3)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (3)
50Name.Identifier.ValueText: "Validate", 53Name.Identifier.ValueText: "EnumValidator" 56Identifier.ValueText: "EnumValidator"