273 references to SimpleNameSyntax
Microsoft.CodeAnalysis.CSharp (35)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
224var simpleName = memberAccess.Name;
Binder\Binder.WithQueryLambdaParametersBinder.cs (2)
37protected override BoundExpression BindRangeVariable(SimpleNameSyntax node, RangeVariableSymbol qv, BindingDiagnosticBag diagnostics) 72private BoundExpression SelectField(SimpleNameSyntax node, BoundExpression receiver, string name, BindingDiagnosticBag diagnostics)
Binder\Binder_Crefs.cs (2)
144SimpleNameSyntax? nameSyntax = syntax.Name as SimpleNameSyntax;
Binder\Binder_Expressions.cs (13)
589return BindIdentifier((SimpleNameSyntax)node, invoked, indexed, diagnostics); 1456SimpleNameSyntax node, 1609void adjustIdentifierMapIfAny(SimpleNameSyntax node, bool invoked) 1638private void LookupIdentifier(LookupResult lookupResult, SimpleNameSyntax node, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1675private static bool IsOutVarDiscardIdentifier(SimpleNameSyntax node) 1794private BoundExpression BindNonMethod(SimpleNameSyntax node, Symbol symbol, BindingDiagnosticBag diagnostics, LookupResultKind resultKind, bool indexed, bool isError) 2020bool isUsedBeforeDeclaration(SimpleNameSyntax node, LocalSymbol localSymbol) 2041private bool ReportSimpleProgramLocalReferencedOutsideOfTopLevelStatement(SimpleNameSyntax node, Symbol symbol, BindingDiagnosticBag diagnostics) 2053protected virtual BoundExpression BindRangeVariable(SimpleNameSyntax node, RangeVariableSymbol qv, BindingDiagnosticBag diagnostics) 6464SimpleNameSyntax right, 6535SimpleNameSyntax right, 6686SimpleNameSyntax right, 6757SimpleNameSyntax right,
Binder\Binder_Invocation.cs (1)
30return BindIdentifier((SimpleNameSyntax)node, invoked, indexed, diagnostics);
Binder\Binder_QueryErrors.cs (2)
134private static bool IsJoinRangeVariableInLeftKey(SimpleNameSyntax node) 148private static bool IsInJoinRightKey(SimpleNameSyntax node)
Binder\Binder_Symbols.cs (3)
397/// <see cref="BindQualifiedName(ExpressionSyntax, SimpleNameSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> 816SimpleNameSyntax syntax, 1586SimpleNameSyntax rightName,
Compilation\SyntaxTreeSemanticModel.cs (1)
1732return GetDeclaredMember(container, declarationSpan, ((SimpleNameSyntax)name).Identifier.ValueText);
Symbols\NamespaceSymbol.cs (1)
303return this.GetNestedNamespace(((SimpleNameSyntax)name).Identifier.ValueText);
Syntax\AliasedQualifiedNameSyntax.cs (1)
12internal override SimpleNameSyntax GetUnqualifiedName()
Syntax\NameSyntax.cs (2)
27/// If called on an instance of <see cref="SimpleNameSyntax"/> returns the instance itself. 29internal abstract SimpleNameSyntax GetUnqualifiedName();
Syntax\QualifiedNameSyntax.cs (1)
17internal override SimpleNameSyntax GetUnqualifiedName()
Syntax\SimpleNameSyntax.cs (1)
17internal sealed override SimpleNameSyntax GetUnqualifiedName()
Syntax\SyntaxExtensions.cs (4)
189public static SimpleNameSyntax WithIdentifier(this SimpleNameSyntax simpleName, SyntaxToken identifier) 192? (SimpleNameSyntax)((IdentifierNameSyntax)simpleName).WithIdentifier(identifier) 193: (SimpleNameSyntax)((GenericNameSyntax)simpleName).WithIdentifier(identifier);
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
18: AbstractQualifyMemberAccessDiagnosticAnalyzer<SyntaxKind, ExpressionSyntax, SimpleNameSyntax>
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
93if (invokedExpression is not SimpleNameSyntax and not MemberAccessExpressionSyntax)
CSharpSyntaxFacts.cs (8)
157var name = node as SimpleNameSyntax; 166var name = node as SimpleNameSyntax; 544var simpleName = (SimpleNameSyntax)node; 1322=> ((SimpleNameSyntax)node).Identifier; 1551=> node is SimpleNameSyntax;
ExpressionSyntaxExtensions.cs (4)
139else if (expression is SimpleNameSyntax simpleName) 149private static bool AddSimpleName(SimpleNameSyntax simpleName, List<string> parts) 676public static SimpleNameSyntax? GetRightmostName(this ExpressionSyntax node) 688if (node is SimpleNameSyntax simple)
NameSyntaxComparer.cs (3)
75private static IList<SimpleNameSyntax> DecomposeNameParts(NameSyntax name) 77var result = new List<SimpleNameSyntax>(); 82private static void DecomposeNameParts(NameSyntax name, List<SimpleNameSyntax> result)
SimpleNameSyntaxExtensions.cs (2)
14public static ExpressionSyntax GetLeftSideOfDot(this SimpleNameSyntax name) 38public static bool LooksLikeStandaloneTypeName(this SimpleNameSyntax simpleName)
SimplifyPropertyPatternHelpers.cs (1)
52if (expression is SimpleNameSyntax)
TypeStyleHelper.cs (1)
98var memberName = GetRightmostInvocationExpression(initializerExpression).GetRightmostName();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (20)
CSharpDisambiguateSameVariableCodeFixProvider.cs (2)
58[NotNullWhen(true)] out SimpleNameSyntax? leftName, 148out var nameNode, out var matchingMember, out _))
CSharpQualifyMemberAccessCodeFixProvider.cs (4)
17internal class CSharpQualifyMemberAccessCodeFixProvider : AbstractQualifyMemberAccessCodeFixprovider<SimpleNameSyntax, InvocationExpressionSyntax> 25protected override SimpleNameSyntax? GetNode(Diagnostic diagnostic, CancellationToken cancellationToken) 30case SimpleNameSyntax simpleNameSyntax: 33return invocationExpressionSyntax.Expression as SimpleNameSyntax;
CSharpSimplificationHelpers.cs (1)
34if (parentOfToken is SimpleNameSyntax && parent.Kind() == SyntaxKind.XmlNameAttribute)
CSharpSimplifyLinqExpressionCodeFixProvider.cs (1)
16internal sealed class CSharpSimplifyLinqExpressionCodeFixProvider : AbstractSimplifyLinqExpressionCodeFixProvider<InvocationExpressionSyntax, SimpleNameSyntax, ExpressionSyntax>
CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
110if (innerExpression is SimpleNameSyntax innerName)
CSharpSyntaxGeneratorInternal.cs (1)
66=> SyntaxFactory.MemberBindingExpression((SimpleNameSyntax)name);
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
140var invokeName =
ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (4)
44if (typeSyntax is not SimpleNameSyntax) 47var simpleNameSyntax = (SimpleNameSyntax)typeSyntax; 105ISymbol symbol, ExpressionSyntax container, SimpleNameSyntax syntax)
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
264if (typeSyntax is not SimpleNameSyntax) 267var simpleNameSyntax = (SimpleNameSyntax)typeSyntax; 338private static TypeSyntax AddGlobalAlias(INamespaceOrTypeSymbol symbol, SimpleNameSyntax syntax)
MakeLocalFunctionStaticCodeFixHelper.cs (1)
162else if (instanceReference.Syntax is SimpleNameSyntax name)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
266var lhs = memberAccessExpression.Expression.GetRightmostName();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Diagnostics\FixAllProvider\BatchFixerTests.cs (2)
49if (context.Node is SimpleNameSyntax node) 74if (root.FindNode(context.Span, getInnermostNodeForTie: true) is SimpleNameSyntax node)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Semantics\PatternMatchingTests5.cs (4)
1121var yName = ((MemberAccessExpressionSyntax)subpatterns[0].ExpressionColon.Expression).Name; 1139var xName = ((MemberAccessExpressionSyntax)subpatterns[1].ExpressionColon.Expression).Name; 1310var yName = ((MemberAccessExpressionSyntax)subpatterns[0].ExpressionColon.Expression).Name; 1337var xName = ((MemberAccessExpressionSyntax)subpatterns[1].ExpressionColon.Expression).Name;
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
SyntaxHelpers.cs (1)
317return SyntaxFactory.AliasQualifiedName(externAliasSyntax, (SimpleNameSyntax)nameSyntax);
Microsoft.CodeAnalysis.CSharp.Features (91)
AddImport\CSharpAddImportFeatureService.cs (13)
35internal class CSharpAddImportFeatureService : AbstractAddImportFeatureService<SimpleNameSyntax> 50string diagnosticId, ISyntaxFacts syntaxFacts, SyntaxNode node, out SimpleNameSyntax nameNode) 76if (node is SimpleNameSyntax) 87var memberAccessName = (node.Parent as MemberAccessExpressionSyntax)?.Name; 88var conditionalAccessName = (((node.Parent as ConditionalAccessExpressionSyntax)?.WhenNotNull as InvocationExpressionSyntax)?.Expression as MemberBindingExpressionSyntax)?.Name; 118nameNode = node as SimpleNameSyntax; 159protected override bool CanAddImportForNamespace(string diagnosticId, SyntaxNode node, out SimpleNameSyntax nameNode) 170protected override bool CanAddImportForType(string diagnosticId, SyntaxNode node, out SimpleNameSyntax nameNode) 205private static bool TryFindStandaloneType(SyntaxNode node, out SimpleNameSyntax nameNode) 212nameNode = node as SimpleNameSyntax; 216private static SimpleNameSyntax GetLeftMostSimpleName(QualifiedNameSyntax qn) 221if (left is SimpleNameSyntax simpleName) 543if (nameSyntax is SimpleNameSyntax simpleName)
CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
46node is SimpleNameSyntax ||
CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
80node is SimpleNameSyntax ||
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.cs (1)
52case SimpleNameSyntax simple:
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
182currentNode = ((SimpleNameSyntax)currentNode).WithIdentifier(identifierToken);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
110if (reference is not SimpleNameSyntax nameRef) 203SimpleNameSyntax nameNode,
CSharpDisambiguateSameVariableCodeFixProvider.cs (2)
58[NotNullWhen(true)] out SimpleNameSyntax? leftName, 148out var nameNode, out var matchingMember, out _))
CSharpQualifyMemberAccessCodeFixProvider.cs (4)
17internal class CSharpQualifyMemberAccessCodeFixProvider : AbstractQualifyMemberAccessCodeFixprovider<SimpleNameSyntax, InvocationExpressionSyntax> 25protected override SimpleNameSyntax? GetNode(Diagnostic diagnostic, CancellationToken cancellationToken) 30case SimpleNameSyntax simpleNameSyntax: 33return invocationExpressionSyntax.Expression as SimpleNameSyntax;
CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
18: AbstractQualifyMemberAccessDiagnosticAnalyzer<SyntaxKind, ExpressionSyntax, SimpleNameSyntax>
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
93if (invokedExpression is not SimpleNameSyntax and not MemberAccessExpressionSyntax)
CSharpSimplifyLinqExpressionCodeFixProvider.cs (1)
16internal sealed class CSharpSimplifyLinqExpressionCodeFixProvider : AbstractSimplifyLinqExpressionCodeFixProvider<InvocationExpressionSyntax, SimpleNameSyntax, ExpressionSyntax>
CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
110if (innerExpression is SimpleNameSyntax innerName)
Debugging\BreakpointResolver.cs (1)
96nameParts = parts.Cast<SimpleNameSyntax>().Select(p => new NameAndArity(p.Identifier.ValueText, p.Arity)).ToList();
Diagnostics\Analyzers\CSharpUnboundIdentifiersDiagnosticAnalyzer.cs (1)
16internal sealed class CSharpUnboundIdentifiersDiagnosticAnalyzer : UnboundIdentifiersDiagnosticAnalyzerBase<SyntaxKind, SimpleNameSyntax, QualifiedNameSyntax, IncompleteMemberSyntax>
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
186private SimpleNameSyntax CreateMethodNameForInvocation() 608var methodName = CreateMethodNameForInvocation().WithAdditionalAnnotations(Simplifier.Annotation);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (2)
73SimpleNameSyntax unqualifiedName; 79unqualifiedName = (SimpleNameSyntax)expression;
FullyQualify\CSharpFullyQualifyService.cs (5)
19internal sealed class CSharpFullyQualifyService : AbstractFullyQualifyService<SimpleNameSyntax> 27protected override bool CanFullyQualify(SyntaxNode node, [NotNullWhen(true)] out SimpleNameSyntax? simpleName) 29simpleName = node as SimpleNameSyntax; 42protected override async Task<SyntaxNode> ReplaceNodeAsync(SimpleNameSyntax simpleName, string containerName, bool resultingSymbolIsType, CancellationToken cancellationToken) 45var newName = simpleName.WithLeadingTrivia(SyntaxTriviaList.Empty);
GenerateConstructor\CSharpGenerateConstructorService.cs (5)
35=> node is SimpleNameSyntax; 89var simpleName = (SimpleNameSyntax)node; 121var simpleName = (SimpleNameSyntax)node;
GenerateMember\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (2)
19AbstractGenerateEnumMemberService<CSharpGenerateEnumMemberService, SimpleNameSyntax, ExpressionSyntax> 31SemanticDocument document, SimpleNameSyntax identifierName, CancellationToken cancellationToken,
GenerateMember\GenerateParameterizedMember\CSharpGenerateConversionService.cs (4)
25AbstractGenerateConversionService<CSharpGenerateConversionService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax> 48SemanticDocument document, AbstractGenerateParameterizedMemberService<CSharpGenerateConversionService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax>.State state) 223protected override string GetImplicitConversionDisplayText(AbstractGenerateParameterizedMemberService<CSharpGenerateConversionService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax>.State state) 226protected override string GetExplicitConversionDisplayText(AbstractGenerateParameterizedMemberService<CSharpGenerateConversionService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax>.State state)
GenerateMember\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (2)
24AbstractGenerateDeconstructMethodService<CSharpGenerateDeconstructMethodService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax> 35protected override AbstractInvocationInfo CreateInvocationMethodInfo(SemanticDocument document, AbstractGenerateParameterizedMemberService<CSharpGenerateDeconstructMethodService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax>.State state)
GenerateMember\GenerateParameterizedMember\CSharpGenerateMethodService.cs (4)
25AbstractGenerateMethodService<CSharpGenerateMethodService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax> 37=> node is SimpleNameSyntax; 42protected override AbstractInvocationInfo CreateInvocationMethodInfo(SemanticDocument document, AbstractGenerateParameterizedMemberService<CSharpGenerateMethodService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax>.State state) 84SimpleNameSyntax simpleName,
GenerateMember\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (2)
25internal abstract class CSharpGenerateParameterizedMemberService<TService> : AbstractGenerateParameterizedMemberService<TService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax> 26where TService : AbstractGenerateParameterizedMemberService<TService, SimpleNameSyntax, ExpressionSyntax, InvocationExpressionSyntax>
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (3)
23AbstractGenerateVariableService<CSharpGenerateVariableService, SimpleNameSyntax, ExpressionSyntax> 87SemanticDocument document, SimpleNameSyntax identifierName, CancellationToken cancellationToken, 132private static bool IsProbablyGeneric(SimpleNameSyntax identifierName, CancellationToken cancellationToken)
GenerateType\CSharpGenerateTypeService.cs (13)
34AbstractGenerateTypeService<CSharpGenerateTypeService, SimpleNameSyntax, ObjectCreationExpressionSyntax, ExpressionSyntax, TypeDeclarationSyntax, ArgumentSyntax> 44protected override ExpressionSyntax GetLeftSideOfDot(SimpleNameSyntax simpleName) 130SimpleNameSyntax simpleName, 412if (simpleAssignmentExpression.Left is not SimpleNameSyntax name) 533protected override INamedTypeSymbol DetermineTypeToGenerateIn(SemanticModel semanticModel, SimpleNameSyntax simpleName, CancellationToken cancellationToken) 653Debug.Assert(name is SimpleNameSyntax); 654namespaceContainers.Add(((SimpleNameSyntax)name).Identifier.ValueText); 760internal override bool IsGenericName(SimpleNameSyntax simpleName) 764=> expression is SimpleNameSyntax; 767Solution updatedSolution, SyntaxNode modifiedRoot, Document document, SimpleNameSyntax simpleName, string includeUsingsOrImports, AddImportPlacementOptionsProvider fallbackOptions, CancellationToken cancellationToken) 812SimpleNameSyntax propertyName, 833SimpleNameSyntax propertyName, ITypeSymbol propertyType) 855SimpleNameSyntax propertyName,
GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
45=> node is SimpleNameSyntax or PropertyDeclarationSyntax or MemberBindingExpressionSyntax;
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
140var invokeName =
MakeLocalFunctionStaticCodeFixHelper.cs (1)
162else if (instanceReference.Syntax is SimpleNameSyntax name)
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (7)
311private static readonly Action<SyntaxEditor, InvocationExpressionSyntax, SimpleNameSyntax, SimpleNameSyntax> s_replaceGetReferenceInvocation = 316var currentName = currentInvocation.Expression.GetRightmostName(); 320private static readonly Action<SyntaxEditor, InvocationExpressionSyntax, SimpleNameSyntax, SimpleNameSyntax> s_replaceSetReferenceInvocation = 359Action<SyntaxEditor, InvocationExpressionSyntax, SimpleNameSyntax, SimpleNameSyntax> replace)
SignatureHelp\GenericNameSignatureHelpProvider.cs (1)
86if (genericIdentifier.Parent is not SimpleNameSyntax simpleName)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (1)
71else if (invocationExpression.Expression is SimpleNameSyntax &&
SimplifyPropertyPatternHelpers.cs (1)
52if (expression is SimpleNameSyntax)
SpellCheck\CSharpSpellcheckCodeFixProvider.cs (3)
21internal partial class CSharpSpellCheckCodeFixProvider : AbstractSpellCheckCodeFixProvider<SimpleNameSyntax> 37protected override bool ShouldSpellCheck(SimpleNameSyntax name) 50protected override bool IsGeneric(SimpleNameSyntax nameNode)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\ExpressionBodiedMemberTests.cs (1)
202var semanticInfo = GetSemanticInfoForTest<SimpleNameSyntax>(@"
Semantics\LocalFunctionTests.cs (3)
501Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 549Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 813Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\GetSemanticInfoTests.cs (4)
274var v9right = v9val.Name; 1883var nameSyntaxToBind = (SimpleNameSyntax)GetExprSyntaxForBinding(GetExprSyntaxList(tree)); 4440var rightSyntax = qualifiedSyntax.Right;
Compilation\SemanticModelAPITests.cs (2)
821var cBase = (cDecl.BaseList.Types[0].Type as AliasQualifiedNameSyntax).Name; 2725var right = ((QualifiedNameSyntax)speculatedTypeSyntax).Right;
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2534var rightName = type.Right;
DocumentationComments\CrefTests.cs (4)
5753var parameterTypeContainingType = parameterType.DescendantNodes().OfType<SimpleNameSyntax>().First(); 5797var typeSyntax = cref.DescendantNodes().OfType<SimpleNameSyntax>().First();
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1018var memberNameSyntax = memberAccessSyntax.Name;
Symbols\DestructorTests.cs (1)
413var finalizeSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single().Name;
Symbols\ExtensionMethodTests.cs (1)
2734var symbolInfo = model.GetSymbolInfo((SimpleNameSyntax)node);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxDiffingTests.cs (4)
308var node = root.FindNode(span, getInnermostNodeForTie: true) as SimpleNameSyntax; 373var node = root.FindNode(span, getInnermostNodeForTie: true) as SimpleNameSyntax;
Microsoft.CodeAnalysis.CSharp.Workspaces (76)
CodeGeneration\CSharpSyntaxGenerator.cs (8)
3164(SimpleNameSyntax)simpleName); 3396var sname = (SimpleNameSyntax)expression; 3405return qname.WithRight((SimpleNameSyntax)this.WithTypeArguments(qname.Right, typeArguments)); 3409return aname.WithName((SimpleNameSyntax)this.WithTypeArguments(aname.Name, typeArguments)); 3414return sma.WithName((SimpleNameSyntax)this.WithTypeArguments(sma.Name, typeArguments)); 3422=> SyntaxFactory.QualifiedName((NameSyntax)left, (SimpleNameSyntax)right).WithAdditionalAnnotations(Simplifier.Annotation); 3427(SimpleNameSyntax)name);
CSharpSimplificationHelpers.cs (1)
34if (parentOfToken is SimpleNameSyntax && parent.Kind() == SyntaxKind.XmlNameAttribute)
CSharpSyntaxFacts.cs (8)
157var name = node as SimpleNameSyntax; 166var name = node as SimpleNameSyntax; 544var simpleName = (SimpleNameSyntax)node; 1322=> ((SimpleNameSyntax)node).Identifier; 1551=> node is SimpleNameSyntax;
CSharpSyntaxGeneratorInternal.cs (1)
66=> SyntaxFactory.MemberBindingExpression((SimpleNameSyntax)name);
Extensions\MemberAccessExpressionSyntaxExtensions.cs (1)
16public static SimpleNameSyntax GetNameWithTriviaMoved(this MemberAccessExpressionSyntax memberAccess)
Extensions\SyntaxNodeExtensions.cs (1)
19public static SimpleNameSyntax GetNameWithTriviaMoved(this MemberAccessExpressionSyntax memberAccess)
ExternalAccess\Pythia\Api\PythiaSyntaxExtensions.cs (1)
25public static SimpleNameSyntax? GetRightmostName(this ExpressionSyntax node)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
644if (type is SimpleNameSyntax simpleName) 660private static string GetSimpleTypeName(SimpleNameSyntax name)
ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (4)
44if (typeSyntax is not SimpleNameSyntax) 47var simpleNameSyntax = (SimpleNameSyntax)typeSyntax; 105ISymbol symbol, ExpressionSyntax container, SimpleNameSyntax syntax)
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (4)
264if (typeSyntax is not SimpleNameSyntax) 267var simpleNameSyntax = (SimpleNameSyntax)typeSyntax; 338private static TypeSyntax AddGlobalAlias(INamespaceOrTypeSymbol symbol, SimpleNameSyntax syntax)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (4)
139else if (expression is SimpleNameSyntax simpleName) 149private static bool AddSimpleName(SimpleNameSyntax simpleName, List<string> parts) 676public static SimpleNameSyntax? GetRightmostName(this ExpressionSyntax node) 688if (node is SimpleNameSyntax simple)
NameSyntaxComparer.cs (3)
75private static IList<SimpleNameSyntax> DecomposeNameParts(NameSyntax name) 77var result = new List<SimpleNameSyntax>(); 82private static void DecomposeNameParts(NameSyntax name, List<SimpleNameSyntax> result)
Rename\CSharpRenameRewriterLanguageService.cs (3)
448identifierToken = ((SimpleNameSyntax)expressionOfInvocation).Identifier; 545if (token.Parent is SimpleNameSyntax && 1212return enclosingStatement ?? enclosingNameMemberCrefOrnull ?? token.GetAncestors(n => n is SimpleNameSyntax).FirstOrDefault();
SimpleNameSyntaxExtensions.cs (2)
14public static ExpressionSyntax GetLeftSideOfDot(this SimpleNameSyntax name) 38public static bool LooksLikeStandaloneTypeName(this SimpleNameSyntax simpleName)
Simplification\CSharpSimplificationService.cs (1)
116if (parentOfToken is SimpleNameSyntax && parent.IsKind(SyntaxKind.XmlNameAttribute))
Simplification\CSharpSimplificationService.Expander.cs (20)
421var newNode = (SimpleNameSyntax)base.VisitGenericName(node); 430var newNode = (SimpleNameSyntax)base.VisitIdentifierName(node); 435private ExpressionSyntax VisitSimpleName(SimpleNameSyntax rewrittenSimpleName, SimpleNameSyntax originalSimpleName) 614newNode = ((SimpleNameSyntax)newNode).WithIdentifier(identifier); 705(SimpleNameSyntax)newNode.WithLeadingTrivia(null)) 766private IList<ISymbol> TypeArgumentSymbolsPresentInName(SimpleNameSyntax simpleName) 786private static bool IsInvocationWithDynamicArguments(SimpleNameSyntax originalSimpleName, SemanticModel semanticModel) 865private static bool IsPropertyNameOfObjectInitializer(SimpleNameSyntax identifierName) 920(SimpleNameSyntax)rewrittenNode.WithLeadingTrivia(null)) 959(SimpleNameSyntax)rewrittenNode)); 968(SimpleNameSyntax)rewrittenNode)); 973Debug.Assert(rewrittenNode is SimpleNameSyntax); 977var right = (SimpleNameSyntax)rewrittenNode; 982var right = (SimpleNameSyntax)rewrittenNode; 991(SimpleNameSyntax)rewrittenNode));
Simplification\Reducers\CSharpEscapingReducer.cs (3)
114var expression = (SimpleNameSyntax)parent; 115var newExpression = expression.WithIdentifier(result);
Simplification\Reducers\CSharpExtensionMethodReducer.cs (3)
46else if (node.Expression is SimpleNameSyntax) 48rewrittenNode = TryReduceExtensionMethod(node, semanticModel, rewrittenNode, (SimpleNameSyntax)node.Expression); 54private static InvocationExpressionSyntax TryReduceExtensionMethod(InvocationExpressionSyntax node, SemanticModel semanticModel, InvocationExpressionSyntax rewrittenNode, SimpleNameSyntax expressionName)
Simplification\Simplifiers\MemberAccessExpressionSimplifier.cs (1)
91: node is SimpleNameSyntax;
Simplification\Simplifiers\NameSimplifier.cs (4)
165replacementNode = ((SimpleNameSyntax)replacementNode).WithIdentifier(identifierToken); 206if (name is SimpleNameSyntax simpleName) 224if (aliasQualifiedName.Name is SimpleNameSyntax && 313var simpleName = ((AliasQualifiedNameSyntax)name).Name
TypeStyleHelper.cs (1)
98var memberName = GetRightmostInvocationExpression(initializerExpression).GetRightmostName();