135 references to IdentifierName
Microsoft.CodeAnalysis.CSharp (4)
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (2)
49NameSyntax qualifiedName = SyntaxFactory.IdentifierName(identifiers[0]); 53qualifiedName = SyntaxFactory.QualifiedName(left: qualifiedName, right: SyntaxFactory.IdentifierName(identifiers[j]));
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
235var identifierName = SyntaxFactory.IdentifierName(symbol.Name);
Syntax\NameColonSyntax.cs (1)
30=> NameColon(IdentifierName(name));
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
AnalyzedPattern.cs (1)
53SyntaxFactory.IdentifierName("_"),
CSharpUseImplicitTypeHelper.cs (2)
97var candidateReplacementNode = SyntaxFactory.IdentifierName("var"); 199SyntaxFactory.IdentifierName("var").WithTriviaFrom(declarationTypeNode).WithAdditionalAnnotations(annotation));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (20)
AttributeGenerator.cs (1)
96SyntaxFactory.NameEquals(SyntaxFactory.IdentifierName(kvp.Key)), null,
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
110var type = cannotUseVar ? declaratorToRemoveType!.GenerateTypeSyntax() : IdentifierName("var");
ConvertToRecordEngine.cs (1)
339SyntaxFactory.Argument(SyntaxFactory.IdentifierName(prop.Name)));
CSharpInlineDeclarationCodeFixProvider.cs (1)
263? SyntaxFactory.IdentifierName("var")
CSharpSyntaxGeneratorInternal.cs (1)
52type == null ? SyntaxFactory.IdentifierName("var") : (TypeSyntax)type,
ExpressionGenerator.cs (2)
292var result = SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, memberAccess, SyntaxFactory.IdentifierName(constant.Value)); 305var name = SyntaxFactory.IdentifierName(names[i]);
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
96: (invocationExpression.Expression, SyntaxFactory.IdentifierName(nameof(Action.Invoke))); 143: SyntaxFactory.IdentifierName(nameof(Action.Invoke));
ITypeParameterSymbolExtensions.cs (2)
46constraints.Add(SyntaxFactory.TypeConstraint(SyntaxFactory.IdentifierName("unmanaged"))); 54constraints.Add(SyntaxFactory.TypeConstraint(SyntaxFactory.IdentifierName("notnull")));
ITypeSymbolExtensions.cs (1)
45return SyntaxFactory.IdentifierName("var");
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
111=> AddInformationTo(SyntaxFactory.IdentifierName("dynamic"), symbol); 117syntax = SyntaxFactory.IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 212SyntaxFactory.IdentifierName("System")), 213SyntaxFactory.IdentifierName("Object"));
MakeLocalFunctionStaticCodeFixHelper.cs (2)
160syntaxEditor.ReplaceNode(instanceReference.Syntax, IdentifierName("@this")); 164syntaxEditor.ReplaceNode(name, MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, IdentifierName("@this"), name));
UseImplicitTypeCodeFixProvider.cs (1)
60var implicitType = SyntaxFactory.IdentifierName("var")
UseUtf8StringLiteralCodeFixProvider.cs (1)
212SyntaxFactory.IdentifierName(nameof(ReadOnlySpan<byte>.ToArray))))
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (4)
CompilationContext.cs (2)
625var syntax = SyntaxFactory.IdentifierName(localName); 640var syntax = SyntaxFactory.IdentifierName(parameterName);
SyntaxHelpers.cs (2)
268var identifierName = SyntaxFactory.IdentifierName(builder.ToString()); 294var finalIdentifierName = SyntaxFactory.IdentifierName(builder.ToString());
Microsoft.CodeAnalysis.CSharp.Features (36)
AddImport\CSharpAddImportFeatureService.cs (2)
414var namePiece = SyntaxFactory.IdentifierName(part); 468nameSyntax = AddOrReplaceAlias(nameSyntax, SyntaxFactory.IdentifierName(externAlias));
AnalyzedPattern.cs (1)
53SyntaxFactory.IdentifierName("_"),
ChangeSignature\UnifiedArgumentSyntax.cs (2)
55? Create(argument.WithNameColon(SyntaxFactory.NameColon(SyntaxFactory.IdentifierName(name)))) 56: Create(((AttributeArgumentSyntax)_argument).WithNameColon(SyntaxFactory.NameColon(SyntaxFactory.IdentifierName(name))));
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
52var id = SyntaxFactory.IdentifierName(diagnosticId);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
416var namePiece = SyntaxFactory.IdentifierName(part); 429var namePiece = SyntaxFactory.IdentifierName(part);
Completion\Providers\OutVariableArgumentProvider.cs (1)
51type: SyntaxFactory.IdentifierName("var"),
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
211SyntaxFactory.IdentifierName(invokedMethodName)), 287SyntaxFactory.IdentifierName(nameof(Enumerable.Where))),
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (1)
193SyntaxFactory.IdentifierName(MethodName))).WithAdditionalAnnotations(Formatter.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (1)
21private static readonly TypeSyntax VarNameIdentifier = SyntaxFactory.IdentifierName("var");
ConvertLinq\ConvertForEachToLinqQuery\ToToListConverter.cs (1)
57SyntaxFactory.IdentifierName(nameof(List<object>.AddRange))),
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
30private static readonly TypeSyntax VarNameIdentifier = SyntaxFactory.IdentifierName("var"); 208SyntaxFactory.IdentifierName(nameof(object.Equals))), 360SyntaxFactory.IdentifierName(nameof(IList.Add))),
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
110var type = cannotUseVar ? declaratorToRemoveType!.GenerateTypeSyntax() : IdentifierName("var");
ConvertToRecordEngine.cs (1)
339SyntaxFactory.Argument(SyntaxFactory.IdentifierName(prop.Name)));
ConvertTupleToStruct\CSharpConvertTupleToStructCodeRefactoringProvider.cs (1)
45var newName = SyntaxFactory.IdentifierName(name).WithTriviaFrom(nameColon.Name);
CSharpInlineDeclarationCodeFixProvider.cs (1)
263? SyntaxFactory.IdentifierName("var")
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (3)
603: SyntaxFactory.ReturnStatement(SyntaxFactory.IdentifierName(identifierName)); 618arguments.Add(SyntaxFactory.Argument(SyntaxFactory.IdentifierName(argument.Name)).WithRefOrOutKeyword(refOrOut)); 643SyntaxFactory.IdentifierName(nameof(Task.ConfigureAwait))),
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
126IdentifierName("var"),
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
96: (invocationExpression.Expression, SyntaxFactory.IdentifierName(nameof(Action.Invoke))); 143: SyntaxFactory.IdentifierName(nameof(Action.Invoke));
MakeLocalFunctionStaticCodeFixHelper.cs (2)
160syntaxEditor.ReplaceNode(instanceReference.Syntax, IdentifierName("@this")); 164syntaxEditor.ReplaceNode(name, MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, IdentifierName("@this"), name));
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
301return SyntaxFactory.IdentifierName("value").WithTriviaFrom(node);
Snippets\CSharpForEachLoopSnippetProvider.cs (3)
41var varIdentifier = SyntaxFactory.IdentifierName("var"); 47? SyntaxFactory.IdentifierName("collection") 48: SyntaxFactory.IdentifierName(enumerationSymbol.Name);
UseImplicitTypeCodeFixProvider.cs (1)
60var implicitType = SyntaxFactory.IdentifierName("var")
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
205var localReference = SyntaxFactory.IdentifierName(localName);
UseUtf8StringLiteralCodeFixProvider.cs (1)
212SyntaxFactory.IdentifierName(nameof(ReadOnlySpan<byte>.ToArray))))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\GlobalUsingDirectiveTests.cs (1)
4975var alias1 = SyntaxFactory.IdentifierName("alias1");
Semantics\InteractiveUsingTests.cs (2)
586SyntaxFactory.IdentifierName(name), 596SyntaxFactory.IdentifierName(name),
Semantics\SyntaxTreeRootTests.cs (2)
26var node = SyntaxFactory.UsingDirective(SyntaxFactory.IdentifierName("Blah")); 60var arbitraryTree = SyntaxFactory.SyntaxTree(SyntaxFactory.Attribute(SyntaxFactory.IdentifierName("Wooh")));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\GetUnusedImportDirectivesTests.cs (1)
195var info = model.GetSpeculativeSymbolInfo(position, SyntaxFactory.IdentifierName("Console"), SpeculativeBindingOption.BindAsTypeOrNamespace);
Compilation\SemanticModelAPITests.cs (1)
3585var attributeSyntax = SyntaxFactory.Attribute(SyntaxFactory.IdentifierName("Category"));
Symbols\ConversionTests.cs (2)
411ExpressionSyntax sourceExpression3 = SyntaxFactory.IdentifierName("jj"); 417ExpressionSyntax sourceExpression4 = SyntaxFactory.IdentifierName("ss");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (29)
Parsing\InterpolationTests.cs (3)
14Assert.Equal("{a}", SyntaxFactory.Interpolation(SyntaxFactory.IdentifierName("a")).ToFullString()); 21SyntaxFactory.IdentifierName("a"), 24SyntaxFactory.IdentifierName("b")),
Syntax\SeparatedSyntaxListTests.cs (4)
277SyntaxFactory.IdentifierName("B"), 299SyntaxFactory.IdentifierName("A"), 300SyntaxFactory.IdentifierName("B"), 301SyntaxFactory.IdentifierName("C"),
Syntax\StructuredTriviaTests.cs (1)
24var trivia1 = SyntaxFactory.Trivia(SyntaxFactory.IfDirectiveTrivia(SyntaxFactory.IdentifierName(conditionName), false, false, false));
Syntax\SyntaxFactoryTests.cs (8)
248var singleton1 = SyntaxFactory.SeparatedList(new[] { SyntaxFactory.IdentifierName("a") }); 254var singleton2 = SyntaxFactory.SeparatedList((System.Collections.Generic.IEnumerable<ExpressionSyntax>)new[] { SyntaxFactory.IdentifierName("x") }); 260var list1 = SyntaxFactory.SeparatedList(new[] { SyntaxFactory.IdentifierName("a"), SyntaxFactory.IdentifierName("b"), SyntaxFactory.IdentifierName("c") }); 267builder.Add(SyntaxFactory.Argument(SyntaxFactory.IdentifierName("x"))); 268builder.Add(SyntaxFactory.Argument(SyntaxFactory.IdentifierName("y"))); 269builder.Add(SyntaxFactory.Argument(SyntaxFactory.IdentifierName("z")));
Syntax\SyntaxListTests.cs (1)
263SyntaxFactory.IdentifierName("B"),
Syntax\SyntaxNodeTests.cs (8)
55var qname2 = qname.WithRight(SyntaxFactory.IdentifierName("C")); 1829var externAlias = SyntaxFactory.IdentifierName("alias"); 1830var goo = SyntaxFactory.IdentifierName("Goo"); 1831var bar = SyntaxFactory.IdentifierName("Bar"); 3588NameSyntax name = SyntaxFactory.QualifiedName(SyntaxFactory.IdentifierName("System"), SyntaxFactory.IdentifierName("Collections.Generic")); 3704SyntaxNode namedNode = SyntaxFactory.IdentifierName("goo"); 3738nodeOrToken = SyntaxFactory.IdentifierName("goo");
Syntax\SyntaxNormalizerTests.cs (1)
3583SyntaxFactory.IdentifierName("a"), false, false, false)),
Syntax\TrackNodeTests.cs (3)
100var replacedExpr = trackedExpr.ReplaceNode(currentA, SyntaxFactory.IdentifierName("c")); 112var replacedExpr = trackedExpr.ReplaceNode(currentA, SyntaxFactory.IdentifierName("c")); 184Assert.Throws<ArgumentException>(() => expr.TrackNodes(SyntaxFactory.IdentifierName("c")));
Microsoft.CodeAnalysis.CSharp.Workspaces (16)
AttributeGenerator.cs (1)
96SyntaxFactory.NameEquals(SyntaxFactory.IdentifierName(kvp.Key)), null,
CSharpSyntaxGeneratorInternal.cs (1)
52type == null ? SyntaxFactory.IdentifierName("var") : (TypeSyntax)type,
CSharpUseImplicitTypeHelper.cs (2)
97var candidateReplacementNode = SyntaxFactory.IdentifierName("var"); 199SyntaxFactory.IdentifierName("var").WithTriviaFrom(declarationTypeNode).WithAdditionalAnnotations(annotation));
ExpressionGenerator.cs (2)
292var result = SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, memberAccess, SyntaxFactory.IdentifierName(constant.Value)); 305var name = SyntaxFactory.IdentifierName(names[i]);
ITypeParameterSymbolExtensions.cs (2)
46constraints.Add(SyntaxFactory.TypeConstraint(SyntaxFactory.IdentifierName("unmanaged"))); 54constraints.Add(SyntaxFactory.TypeConstraint(SyntaxFactory.IdentifierName("notnull")));
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
111=> AddInformationTo(SyntaxFactory.IdentifierName("dynamic"), symbol); 117syntax = SyntaxFactory.IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 212SyntaxFactory.IdentifierName("System")), 213SyntaxFactory.IdentifierName("Object"));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (1)
45return SyntaxFactory.IdentifierName("var");
Simplification\Reducers\CSharpVarReducer.Rewriter.cs (1)
47return SyntaxFactory.IdentifierName("var")
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
127var aliasIdentifier = SyntaxFactory.IdentifierName(aliasName); 288var aliasIdentifier = SyntaxFactory.IdentifierName(aliasName);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (12)
CodeGeneration\AddAttributesTests.cs (1)
44SyntaxFactory.IdentifierName("System.Reflection.AssemblyVersion(\"1.0.0.0\")"))))
CodeGeneration\SyntaxGeneratorTests.cs (11)
1200SyntaxFactory.IdentifierName("IGeneral"))) 1241SyntaxFactory.IdentifierName("C")))))) 1249SyntaxFactory.IdentifierName("C")), 1254SyntaxFactory.IdentifierName("C"))}))) 1290SyntaxFactory.IdentifierName("C")))))) 1339SyntaxFactory.IdentifierName("IGeneral"))) 1359SyntaxFactory.IdentifierName("IGeneral"))) 1383SyntaxFactory.IdentifierName("IGeneral"))) 1410SyntaxFactory.IdentifierName("IGeneral"))) 1438SyntaxFactory.IdentifierName("EventHandler"), 1442SyntaxFactory.IdentifierName("IGeneral")))
Microsoft.CodeAnalysis.UnitTests (1)
CommonSyntaxTests.cs (1)
80SyntaxNode node = CSharp.SyntaxFactory.IdentifierName("test");
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
922return ((AttributeArgumentSyntax)node).WithNameEquals(SyntaxFactory.NameEquals(SyntaxFactory.IdentifierName(name)));