2 types derived from NameSyntax
Microsoft.CodeAnalysis.CSharp (2)
Syntax\AliasedQualifiedNameSyntax.cs (1)
7
public sealed partial class AliasQualifiedNameSyntax :
NameSyntax
Syntax\QualifiedNameSyntax.cs (1)
12
public sealed partial class QualifiedNameSyntax :
NameSyntax
302 references to NameSyntax
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder_Expressions.cs (4)
2712
private static
NameSyntax
GetNameSyntax(SyntaxNode syntax)
2725
internal static
NameSyntax
GetNameSyntax(SyntaxNode syntax, out string nameString)
2750
return syntax as
NameSyntax
;
2763
var
nameSyntax = GetNameSyntax(syntax, out nameString);
Binder\Binder_Symbols.cs (5)
1063
private static LookupOptions GetSimpleNameLookupOptions(
NameSyntax
node, bool isVerbatimIdentifier)
2025
(where as
NameSyntax
)?.ErrorDisplayName() ?? simpleName,
2164
new object[] { (where as
NameSyntax
)?.ErrorDisplayName() ?? simpleName, first, second });
2171
(where as
NameSyntax
)?.ErrorDisplayName() ?? simpleName,
2270
CSDiagnosticInfo info = NotFound(where, simpleName, arity, (where as
NameSyntax
)?.ErrorDisplayName() ?? simpleName, diagnostics, aliasOpt, qualifierOpt, options);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
871
private static Binder MakeNamespaceBinder(CSharpSyntaxNode node,
NameSyntax
name, Binder outer, bool inUsing)
Binder\WithExternAndUsingAliasesBinder.cs (1)
213
var
name = namespaceDecl.Name;
Compilation\AttributeSemanticModel.cs (1)
94
return new BoundTypeExpression((
NameSyntax
)node, _aliasOpt, type: AttributeType);
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
49
NameSyntax
qualifiedName = SyntaxFactory.IdentifierName(identifiers[0]);
Compilation\SyntaxTreeSemanticModel.cs (1)
1726
private Symbol GetDeclaredMember(NamespaceOrTypeSymbol container, TextSpan declarationSpan,
NameSyntax
name)
CSharpDeclarationComputer.cs (1)
89
NameSyntax
name = ns.Name;
Declarations\DeclarationTreeBuilder.cs (4)
295
if (directive.Name is not
NameSyntax
name)
421
NameSyntax
name = node.Name;
540
private static bool ContainsAlias(
NameSyntax
name)
556
private static bool ContainsGeneric(
NameSyntax
name)
FlowAnalysis\NullableWalker.cs (1)
6093
var
nameSyntax = Binder.GetNameSyntax(syntax, out _);
SourceGeneration\CSharpSyntaxHelper.cs (1)
64
=> ((
NameSyntax
)node).GetUnqualifiedName().Identifier.ValueText;
Symbols\AliasSymbol.cs (1)
384
else if (usingDirective.NamespaceOrType is not
NameSyntax
)
Symbols\NamespaceSymbol.cs (1)
297
internal NamespaceSymbol GetNestedNamespace(
NameSyntax
name)
Symbols\Source\ExplicitInterfaceHelpers.cs (3)
53
NameSyntax
explicitInterfaceName = explicitInterfaceSpecifierOpt.Name;
206
var
explicitInterfaceSyntax = explicitInterfaceSpecifierSyntax.Name;
222
var
explicitInterfaceSyntax = explicitInterfaceSpecifierSyntax.Name;
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
815
NameSyntax
name;
Syntax\NamespaceDeclarationSyntax.cs (1)
21
public NamespaceDeclarationSyntax Update(SyntaxToken namespaceKeyword,
NameSyntax
name, SyntaxToken openBraceToken, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\NamespaceDeclarationSyntaxReference.cs (1)
35
while (node is
NameSyntax
)
Syntax\NameSyntax.cs (1)
43
NameSyntax
name = this;
Syntax\SyntaxFactory.cs (6)
1678
public static
NameSyntax
ParseName(string text, int offset = 0, bool consumeFullText = true)
1685
return (
NameSyntax
)node.CreateRed();
2646
public static UsingDirectiveSyntax UsingDirective(NameEqualsSyntax alias,
NameSyntax
name)
2656
public static UsingDirectiveSyntax UsingDirective(SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias,
NameSyntax
name, SyntaxToken semicolonToken)
2688
public static NamespaceDeclarationSyntax NamespaceDeclaration(
NameSyntax
name, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members)
2692
public static NamespaceDeclarationSyntax NamespaceDeclaration(SyntaxToken namespaceKeyword,
NameSyntax
name, SyntaxToken openBraceToken, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\UsingDirectiveSyntax.cs (8)
19
public
NameSyntax
? Name => this.NamespaceOrType as
NameSyntax
;
21
public UsingDirectiveSyntax Update(SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias,
NameSyntax
name, SyntaxToken semicolonToken)
24
public UsingDirectiveSyntax Update(SyntaxToken globalKeyword, SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias,
NameSyntax
name, SyntaxToken semicolonToken)
27
public UsingDirectiveSyntax WithName(
NameSyntax
name)
37
public static UsingDirectiveSyntax UsingDirective(SyntaxToken staticKeyword, NameEqualsSyntax? alias,
NameSyntax
name)
41
public static UsingDirectiveSyntax UsingDirective(SyntaxToken globalKeyword, SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias,
NameSyntax
name, SyntaxToken semicolonToken)
45
public static UsingDirectiveSyntax UsingDirective(
NameSyntax
name)
Microsoft.CodeAnalysis.CSharp.CodeStyle (22)
CSharpSyntaxFacts.cs (2)
1039
if (parent is not
NameSyntax
)
1154
=> (node as
NameSyntax
).IsLeftSideOfExplicitInterfaceSpecifier();
ExpressionSyntaxExtensions.cs (1)
99
public static bool IsLeftSideOfExplicitInterfaceSpecifier([NotNullWhen(true)] this
NameSyntax
? name)
NameSyntaxComparer.cs (9)
10
internal class NameSyntaxComparer : IComparer<
NameSyntax
?>
21
public static IComparer<
NameSyntax
?> Create()
24
public static IComparer<
NameSyntax
?> Create(IComparer<SyntaxToken> tokenComparer)
27
public int Compare(
NameSyntax
? x,
NameSyntax
? y)
53
int DecomposeCompare(
NameSyntax
x,
NameSyntax
y)
75
private static IList<SimpleNameSyntax> DecomposeNameParts(
NameSyntax
name)
82
private static void DecomposeNameParts(
NameSyntax
name, List<SimpleNameSyntax> result)
ParenthesizedExpressionSyntaxExtensions.cs (2)
507
if (castExpression.Type is
NameSyntax
name && StartsWithAlias(name))
527
private static bool StartsWithAlias(
NameSyntax
name)
TypeSyntaxComparer.cs (6)
13
internal readonly IComparer<
NameSyntax
?> NameComparer;
15
internal TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<
NameSyntax
?> nameComparer)
36
if (x is
NameSyntax
&& y is
NameSyntax
)
38
return NameComparer.Compare((
NameSyntax
)x, (
NameSyntax
)y);
UsingsAndExternAliasesDirectiveComparer.cs (2)
22
private readonly IComparer<
NameSyntax
> _nameComparer;
26
IComparer<
NameSyntax
> nameComparer,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (25)
AttributeGenerator.cs (1)
80
return attribute.AttributeClass.GenerateTypeSyntax() is
NameSyntax
nameSyntax
CSharpCodeGenerationHelpers.cs (1)
215
if (implementation.ContainingType.GenerateTypeSyntax() is not
NameSyntax
name)
ITypeSymbolExtensions.cs (2)
29
public static
NameSyntax
GenerateNameSyntax(this INamespaceOrTypeSymbol symbol, bool allowVar = true)
30
=> (
NameSyntax
)GenerateTypeSyntax(symbol, nameSyntax: true, allowVar: allowVar);
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (3)
273
if (containingTypeSyntax is
NameSyntax
name)
298
(
NameSyntax
)container,
329
(
NameSyntax
)container,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
988
if (nameToken.Parent is not
NameSyntax
name)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
22
var
name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
NamespaceGenerator.cs (3)
153
var
name = GenerateName(alias.Target);
163
var
name = GenerateName(namespaceOrType);
173
private static
NameSyntax
GenerateName(INamespaceOrTypeSymbol symbol)
NameSyntaxExtensions.cs (6)
16
public static IList<
NameSyntax
> GetNameParts(this
NameSyntax
nameSyntax)
19
public static
NameSyntax
GetLastDottedName(this
NameSyntax
nameSyntax)
25
public static SyntaxToken GetNameToken(this
NameSyntax
nameSyntax)
52
public static bool CanBeReplacedWithAnyName(this
NameSyntax
nameSyntax)
NameSyntaxIterator.cs (6)
13
internal class NameSyntaxIterator : IEnumerable<
NameSyntax
>
15
private readonly
NameSyntax
_name;
17
public NameSyntaxIterator(
NameSyntax
name)
20
public IEnumerator<
NameSyntax
> GetEnumerator()
22
var nodes = new LinkedList<
NameSyntax
>();
24
var
currentNode = _name;
TypeSyntaxExtensions.cs (1)
37
if (typeSyntax is not
NameSyntax
nameSyntax)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (6)
CompilationContext.cs (1)
1216
if (!SyntaxHelpers.TryParseDottedName(name, out
var
nameSyntax) || nameSyntax.Kind() != SyntaxKind.IdentifierName)
SyntaxHelpers.cs (5)
246
internal static bool TryParseDottedName(string input, [NotNullWhen(true)] out
NameSyntax
? output)
273
? (
NameSyntax
)identifierName
296
? (
NameSyntax
)finalIdentifierName
307
internal static
NameSyntax
PrependExternAlias(IdentifierNameSyntax externAliasSyntax,
NameSyntax
nameSyntax)
Microsoft.CodeAnalysis.CSharp.Features (32)
AddImport\CSharpAddImportFeatureService.cs (7)
220
var
left = qn.Left;
406
private
NameSyntax
CreateNameSyntax(IReadOnlyList<string> namespaceParts, int index)
447
var
nameSyntax = namespaceOrTypeSymbol.GenerateNameSyntax();
494
private static
NameSyntax
RemoveGlobalAliasIfUnnecessary(
496
NameSyntax
nameSyntax,
540
private
NameSyntax
AddOrReplaceAlias(
541
NameSyntax
nameSyntax, IdentifierNameSyntax alias)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (3)
110
var
attributeName = suppressMessageAttribute.GenerateNameSyntax()
143
var
attributeName = suppressMessageAttribute.GenerateNameSyntax();
151
NameSyntax
attributeName,
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
141
var
qualifiedNamespaceName = CreateNamespaceAsQualifiedName(newNamespaceParts, aliasQualifier, newNamespaceParts.Length - 1);
411
private static
NameSyntax
CreateNamespaceAsQualifiedName(ImmutableArray<string> namespaceParts, string? aliasQualifier, int index)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (1)
71
var
name = specifierNode.Name;
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (2)
20
NameSyntax
,
33
NameSyntax
nameNode, AnonymousObjectCreationExpressionSyntax anonymousObject)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
89
private static void AddUsingDirectives(
NameSyntax
name, SyntaxAnnotation annotation, ArrayBuilder<UsingDirectiveSyntax> directives)
ConvertTupleToStruct\CSharpConvertTupleToStructCodeRefactoringProvider.cs (1)
19
NameSyntax
,
CSharpDeclarationComputer.cs (1)
89
NameSyntax
name = ns.Name;
Debugging\BreakpointResolver.cs (1)
55
var
name = SyntaxFactory.ParseName(text, consumeFullText: false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
71
if (expression is
NameSyntax
)
GenerateConstructor\CSharpGenerateConstructorService.cs (4)
90
var
fullName = simpleName.IsRightSideOfQualifiedName()
91
? (
NameSyntax
)simpleName.Parent
122
var
fullName = simpleName.IsRightSideOfQualifiedName()
123
? (
NameSyntax
)simpleName.Parent
GenerateType\CSharpGenerateTypeService.cs (1)
644
private void GetNamespaceContainers(
NameSyntax
name, List<string> namespaceContainers)
IntroduceVariable\CSharpIntroduceVariableService.cs (1)
23
AbstractIntroduceVariableService<CSharpIntroduceVariableService, ExpressionSyntax, TypeSyntax, TypeDeclarationSyntax, QueryExpressionSyntax,
NameSyntax
>
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (2)
219
NameSyntax
newLocalName,
287
NameSyntax
newLocalName,
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (1)
79
NameSyntax
newLocalName,
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProviderExtensions.cs (1)
25
public static bool IsSuppressMessageAttribute(this
NameSyntax
? name)
Wrapping\ChainedExpression\CSharpChainedExpressionWrapper.cs (1)
15
AbstractChainedExpressionWrapper<
NameSyntax
, BaseArgumentListSyntax>
Wrapping\SeparatedSyntaxList\CSharpArgumentWrapper.cs (1)
114
if (expr is
NameSyntax
name)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\BindingTests.cs (1)
3476
var
node2 = ((QualifiedNameSyntax)node1).Left;
Semantics\LambdaTests.cs (2)
1082
var
oReference =
1086
.OfType<
NameSyntax
>()
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Compilation\GetSemanticInfoTests.cs (1)
4439
var
leftSyntax = qualifiedSyntax.Left;
Compilation\SemanticModelAPITests.cs (5)
2800
var
speculatedUsingExpression = SyntaxFactory.ParseName("System.Collections");
2815
var
speculatedUsingExpression = SyntaxFactory.ParseName("System.ArgumentException");
2835
var
speculatedTypeExpression = SyntaxFactory.ParseName("System.ArgumentException");
2866
var
speculatedTypeExpression = SyntaxFactory.ParseName("System.ArgumentException");
2895
var
speculatedAliasName = SyntaxFactory.ParseName("A");
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
2497
var
ns = type.Left;
2593
var
ns = type.Left;
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
402
var semanticInfo = GetSemanticInfoForTest<
NameSyntax
>(sourceCode);
DocumentationComments\CrefTests.cs (5)
5697
foreach (
var
id in cref.DescendantNodes().OfType<
NameSyntax
>())
6285
var
speculatedName = SyntaxFactory.ParseName("b");
6342
var
accessorName = SyntaxFactory.ParseName(accessor.Name);
6357
var
inheritedTypeName = SyntaxFactory.ParseName(inheritedType.Name);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1043
var
interfaceName = explicitInterfaceImplementation.ExplicitInterfaceSpecifier.Name;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (48)
Parsing\ExpressionParsingTests.cs (1)
3030
Assert.Equal(1, ((
NameSyntax
)objectCreation.Type).Arity);
Parsing\NameParsingTests.cs (46)
21
private
NameSyntax
ParseName(string text)
35
var
name = ParseName(text);
48
var
name = ParseName(text);
61
var
name = ParseName(text);
75
var
name = ParseName(text);
90
var
name = ParseName(text);
105
var
name = ParseName(text);
120
var
name = ParseName(text);
133
var
name = ParseName(text);
148
var
name = ParseName(text);
161
var
name = ParseName(text);
190
var
name = ParseName(text);
208
var
name = ParseName(text);
224
var
name = ParseName(text);
240
var
name = ParseName(text);
258
var
name = ParseName(text);
300
var
name = ParseName(text);
317
var
name = ParseName(text);
338
var
name = (
NameSyntax
)tname;
352
var
name = (
NameSyntax
)tname;
366
var
name = (
NameSyntax
)tname;
383
var
name = (
NameSyntax
)tname;
444
var
name = (
NameSyntax
)tname;
494
var
name = (
NameSyntax
)((NullableTypeSyntax)tname).ElementType;
509
var
name = (
NameSyntax
)((PointerTypeSyntax)tname).ElementType;
535
var
name = (
NameSyntax
)tname;
557
var
name = (
NameSyntax
)array.ElementType;
579
var
name = (
NameSyntax
)array.ElementType;
610
var
name = (
NameSyntax
)array.ElementType;
620
var
tname = ParseName(text);
645
var
tname = ParseName(text);
671
var
tname = ParseName(text);
697
var
tname = ParseName(text);
729
var
tname = ParseName(text);
754
var
tname = ParseName(text);
Syntax\SyntaxNodeTests.cs (1)
3588
NameSyntax
name = SyntaxFactory.QualifiedName(SyntaxFactory.IdentifierName("System"), SyntaxFactory.IdentifierName("Collections.Generic"));
Microsoft.CodeAnalysis.CSharp.Workspaces (97)
AttributeGenerator.cs (1)
80
return attribute.AttributeClass.GenerateTypeSyntax() is
NameSyntax
nameSyntax
Classification\SyntaxClassification\NameSyntaxClassifier.cs (11)
29
if (syntax is
NameSyntax
name)
35
public override ImmutableArray<Type> SyntaxNodeTypes { get; } = ImmutableArray.Create(typeof(
NameSyntax
));
51
NameSyntax
name,
67
NameSyntax
name,
100
NameSyntax
name,
136
NameSyntax
name,
301
private static bool IsInVarContext(
NameSyntax
name)
313
NameSyntax
name,
335
NameSyntax
name,
350
NameSyntax
name, SymbolInfo symbolInfo, ArrayBuilder<ClassifiedSpan> result)
363
private static bool TryClassifyAsyncIdentifier(
NameSyntax
name, SymbolInfo symbolInfo, ArrayBuilder<ClassifiedSpan> result)
CodeGeneration\CSharpSyntaxGenerator.cs (7)
125
if (node is
NameSyntax
name)
160
=> SyntaxFactory.UsingDirective((
NameSyntax
)name);
163
=> SyntaxFactory.UsingDirective(SyntaxFactory.NameEquals(aliasIdentifierName), (
NameSyntax
)name);
168
(
NameSyntax
)name,
588
return WithInterfaceSpecifier(d, SyntaxFactory.ExplicitInterfaceSpecifier((
NameSyntax
)interfaceTypeName));
913
=> AsAttributeList(SyntaxFactory.Attribute((
NameSyntax
)name, AsAttributeArgumentList(attributeArguments)));
3422
=> SyntaxFactory.QualifiedName((
NameSyntax
)left, (SimpleNameSyntax)right).WithAdditionalAnnotations(Simplifier.Annotation);
CSharpCodeGenerationHelpers.cs (1)
215
if (implementation.ContainingType.GenerateTypeSyntax() is not
NameSyntax
name)
CSharpSyntaxFacts.cs (2)
1039
if (parent is not
NameSyntax
)
1154
=> (node as
NameSyntax
).IsLeftSideOfExplicitInterfaceSpecifier();
Editing\CSharpImportAdder.cs (1)
188
private void CheckName(
NameSyntax
node)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (4)
37
NameSyntax
,
477
protected override
NameSyntax
GetName(BaseNamespaceDeclarationSyntax node)
480
protected override
NameSyntax
GetLeft(QualifiedNameSyntax node)
483
protected override
NameSyntax
GetRight(QualifiedNameSyntax node)
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (3)
273
if (containingTypeSyntax is
NameSyntax
name)
298
(
NameSyntax
)container,
329
(
NameSyntax
)container,
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (1)
99
public static bool IsLeftSideOfExplicitInterfaceSpecifier([NotNullWhen(true)] this
NameSyntax
? name)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
988
if (nameToken.Parent is not
NameSyntax
name)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (2)
29
public static
NameSyntax
GenerateNameSyntax(this INamespaceOrTypeSymbol symbol, bool allowVar = true)
30
=> (
NameSyntax
)GenerateTypeSyntax(symbol, nameSyntax: true, allowVar: allowVar);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
22
var
name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs\TypeSyntaxExtensions.cs (1)
37
if (typeSyntax is not
NameSyntax
nameSyntax)
NamespaceGenerator.cs (3)
153
var
name = GenerateName(alias.Target);
163
var
name = GenerateName(namespaceOrType);
173
private static
NameSyntax
GenerateName(INamespaceOrTypeSymbol symbol)
NameSyntaxComparer.cs (9)
10
internal class NameSyntaxComparer : IComparer<
NameSyntax
?>
21
public static IComparer<
NameSyntax
?> Create()
24
public static IComparer<
NameSyntax
?> Create(IComparer<SyntaxToken> tokenComparer)
27
public int Compare(
NameSyntax
? x,
NameSyntax
? y)
53
int DecomposeCompare(
NameSyntax
x,
NameSyntax
y)
75
private static IList<SimpleNameSyntax> DecomposeNameParts(
NameSyntax
name)
82
private static void DecomposeNameParts(
NameSyntax
name, List<SimpleNameSyntax> result)
NameSyntaxExtensions.cs (6)
16
public static IList<
NameSyntax
> GetNameParts(this
NameSyntax
nameSyntax)
19
public static
NameSyntax
GetLastDottedName(this
NameSyntax
nameSyntax)
25
public static SyntaxToken GetNameToken(this
NameSyntax
nameSyntax)
52
public static bool CanBeReplacedWithAnyName(this
NameSyntax
nameSyntax)
NameSyntaxIterator.cs (6)
13
internal class NameSyntaxIterator : IEnumerable<
NameSyntax
>
15
private readonly
NameSyntax
_name;
17
public NameSyntaxIterator(
NameSyntax
name)
20
public IEnumerator<
NameSyntax
> GetEnumerator()
22
var nodes = new LinkedList<
NameSyntax
>();
24
var
currentNode = _name;
ParenthesizedExpressionSyntaxExtensions.cs (2)
507
if (castExpression.Type is
NameSyntax
name && StartsWithAlias(name))
527
private static bool StartsWithAlias(
NameSyntax
name)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
312
private RecommendedSymbols GetSymbolsOffOfName(
NameSyntax
name)
Rename\CSharpRenameRewriterLanguageService.cs (2)
611
var
parsedIdentifier = SyntaxFactory.ParseName(currentNewIdentifier);
1133
var
name = SyntaxFactory.ParseName(replacementText);
Simplification\CSharpSimplificationService.Expander.cs (3)
958
(
NameSyntax
)left,
978
result = rewrittenNode.CopyAnnotationsTo(SyntaxFactory.QualifiedName((
NameSyntax
)left, right.WithAdditionalAnnotations(Simplifier.SpecialTypeAnnotation)));
983
result = rewrittenNode.CopyAnnotationsTo(SyntaxFactory.QualifiedName((
NameSyntax
)left, right));
Simplification\Simplifiers\ExpressionSimplifier.cs (2)
83
if (expression is
NameSyntax
name)
301
replacementNode = qualifiedName.Update((
NameSyntax
)newLeft, qualifiedName.DotToken, qualifiedName.Right)
Simplification\Simplifiers\NameSimplifier.cs (19)
25
internal class NameSimplifier : AbstractCSharpSimplifier<
NameSyntax
, TypeSyntax>
34
NameSyntax
name,
62
var
left = qualifiedName.Left;
360
NameSyntax
name, TypeSyntax replacement,
377
replacement is
NameSyntax
replacementName)
391
private static bool CanSimplifyNullable(INamedTypeSymbol type,
NameSyntax
name, SemanticModel semanticModel)
449
NameSyntax
name,
475
NameSyntax
name,
560
NameSyntax
name, TypeSyntax reducedName, SemanticModel semanticModel)
579
private static bool ContainsOpenName(
NameSyntax
name)
595
private static bool CanReplaceWithReducedName(
NameSyntax
name, TypeSyntax reducedName, SemanticModel semanticModel, CancellationToken cancellationToken)
606
private static bool IsNotNullableReplaceable(
NameSyntax
name, TypeSyntax reducedName)
635
!(simplifiedNode is
NameSyntax
);
658
private static bool IsNonReducableQualifiedNameInUsingDirective(SemanticModel model,
NameSyntax
name)
666
private static bool IsQualifiedNameInUsingDirective(SemanticModel model,
NameSyntax
name)
670
name = (
NameSyntax
)name.Parent;
688
private static bool IsGlobalAliasQualifiedName(
NameSyntax
name)
695
private static bool IsInScriptClass(SemanticModel model,
NameSyntax
name)
711
private static bool PreferPredefinedTypeKeywordInDeclarations(
NameSyntax
name, CSharpSimplifierOptions options, SemanticModel semanticModel)
TypeSyntaxComparer.cs (6)
13
internal readonly IComparer<
NameSyntax
?> NameComparer;
15
internal TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<
NameSyntax
?> nameComparer)
36
if (x is
NameSyntax
&& y is
NameSyntax
)
38
return NameComparer.Compare((
NameSyntax
)x, (
NameSyntax
)y);
UsingsAndExternAliasesDirectiveComparer.cs (2)
22
private readonly IComparer<
NameSyntax
> _nameComparer;
26
IComparer<
NameSyntax
> nameComparer,
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SerializationTests.cs (1)
68
var
name = CS.SyntaxFactory.ParseName(symbolName);
Microsoft.VisualStudio.LanguageServices.CSharp (9)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (6)
717
private bool CompareNames(
NameSyntax
oldName,
NameSyntax
newName)
819
var
oldName = (
NameSyntax
)oldType;
820
var
newName = (
NameSyntax
)newType;
CodeModel\CSharpCodeModelService.cs (1)
1798
var
nameSyntax = SyntaxFactory.ParseName(name);
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
27
private static void AppendName(StringBuilder builder,
NameSyntax
name)
63
if (type is
NameSyntax
name)