80 references to Name
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
116var declaredUsings = new HashSet<string>(compilationUnit.Usings.Select(x => x.Name.ToString()));
Microsoft.CodeAnalysis.CSharp (3)
Declarations\DeclarationTreeBuilder.cs (1)
379if (directive.Name is not NameSyntax name)
Symbols\Source\QuickAttributeChecker.cs (2)
97usingDirective.Name != null && 101string target = usingDirective.Name.GetUnqualifiedName().Identifier.ValueText;
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (8)
126if (aliasComparisonResult == 0 && using1.Name != null && using2.Name != null) 129return _nameComparer.Compare(using1.Name, using2.Name); 135Contract.ThrowIfNull(using1!.Name); 136Contract.ThrowIfNull(using2!.Name); 137return _nameComparer.Compare(using1!.Name, using2!.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (4)
93Contract.ThrowIfNull(using1.Name); 94Contract.ThrowIfNull(using2.Name); 95var name1 = using1.Name.GetFirstToken().ValueText; 96var name2 = using2.Name.GetFirstToken().ValueText;
Microsoft.CodeAnalysis.CSharp.Features (2)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
121usingDirective.Name?.GetRightmostName() is IdentifierNameSyntax identifierName)
GenerateType\CSharpGenerateTypeService.cs (1)
739.Select(n => n.Name.ToString())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\InteractiveUsingTests.cs (2)
93Assert.Equal(typeSymbol, model.GetSymbolInfo(syntax.Name).Symbol); 123Assert.Equal(typeSymbol, model.GetSymbolInfo(syntax.Name).Symbol);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (22)
Compilation\GetImportScopesTests.cs (17)
149Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } })); 150Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } })); 176Assert.True(scopes.Single().Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 199Assert.True(scopes[0].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }); 201Assert.True(scopes[1].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 227Assert.True(scopes[0].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }); 229Assert.True(scopes[1].Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 338Assert.True(scopes.Single().Aliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } })); 339Assert.True(scopes.Single().Aliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } })); 365Assert.True(scopes.Single().Aliases.Single().DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 388Assert.True(scopes[0].Aliases.Single().DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }); 390Assert.True(scopes[1].Aliases.Single().DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 626Assert.True(scopes.Single().Imports.Single().DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }); 683Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } })); 685Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: QualifiedNameSyntax { Right: IdentifierNameSyntax { Identifier.Text: nameof(System.IO) } } })); 689Assert.True(scopes.Single().Aliases.Any(i => i.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } })); 691Assert.True(scopes.Single().Aliases.Any(i => i.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: QualifiedNameSyntax { Right: IdentifierNameSyntax { Identifier.Text: nameof(System.Threading) } } }));
Compilation\SemanticModelAPITests.cs (2)
2801TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, usingStatement.Name.Position, 2816TestGetSpeculativeSemanticModelForTypeSyntax_Common(model, usingStatement.Name.Position,
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
1033var type = model.GetTypeInfo(usingDirective.Name); 2816var info = model.GetSemanticInfoSummary(u1.Name);
Symbols\Source\ExternAliasTests.cs (1)
481var usingTargetSyntax = (QualifiedNameSyntax)usingSyntax.Name;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (19)
Parsing\DeclarationParsingTests.cs (14)
68Assert.NotNull(ud.Name); 69Assert.Equal("a", ud.Name.ToString()); 90Assert.NotNull(ud.Name); 91Assert.Equal("a", ud.Name.ToString()); 157Assert.NotNull(ud.Name); 158Assert.Equal("a.b", ud.Name.ToString()); 179Assert.NotNull(ud.Name); 180Assert.Equal("a.b", ud.Name.ToString()); 201Assert.NotNull(ud.Name); 202Assert.Equal("a<int?>", ud.Name.ToString()); 225Assert.NotNull(ud.Name); 226Assert.Equal("b", ud.Name.ToString()); 249Assert.NotNull(ud.Name); 250Assert.Equal("b<c>", ud.Name.ToString());
Parsing\ParsingErrorRecoveryTests.cs (4)
7074Assert.True(usings[0].Name.IsMissing); 7089Assert.True(usings[0].Name.IsMissing); 7106Assert.True(usings[0].Name.IsMissing); 7130Assert.True(usings[0].Name.IsMissing);
Syntax\SyntaxFactoryTests.cs (1)
38Assert.Equal("System.String", usingDirective.Name.ToFullString());
Microsoft.CodeAnalysis.CSharp.Workspaces (14)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1888UsingDirectiveSyntax usingDirective => usingDirective.Name?.ToString() ?? string.Empty,
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
115var mappedName = GetTypeName(usingDecl.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (8)
126if (aliasComparisonResult == 0 && using1.Name != null && using2.Name != null) 129return _nameComparer.Compare(using1.Name, using2.Name); 135Contract.ThrowIfNull(using1!.Name); 136Contract.ThrowIfNull(using2!.Name); 137return _nameComparer.Compare(using1!.Name, using2!.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (4)
93Contract.ThrowIfNull(using1.Name); 94Contract.ThrowIfNull(using2.Name); 95var name1 = using1.Name.GetFirstToken().ValueText; 96var name2 = using2.Name.GetFirstToken().ValueText;
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (2)
249((UsingDirectiveSyntax)node).Name != null) 1553if (usingDirective.Name?.ToString() == dottedName)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
668startPosition = node.Name.SpanStart; 1207endPosition = node.Name.Span.End;
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
103.Any(u => u?.Name?.ToString() == SystemComponentModelName))