48 references to NameColonSyntax
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Expressions.cs (1)
3285NameColonSyntax nameColonSyntax,
Syntax\NameColonSyntax.cs (2)
26public static NameColonSyntax NameColon(IdentifierNameSyntax name) 29public static NameColonSyntax NameColon(string name)
Syntax\SubpatternSyntax.cs (5)
11public NameColonSyntax? NameColon => ExpressionColon as NameColonSyntax; 13public SubpatternSyntax WithNameColon(NameColonSyntax? nameColon) 16public SubpatternSyntax Update(NameColonSyntax? nameColon, PatternSyntax pattern) 25public static SubpatternSyntax Subpattern(NameColonSyntax? nameColon, PatternSyntax pattern)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UseInferredMemberName\CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
29ReportDiagnosticsIfNeeded((NameColonSyntax)context.Node, context); 37private void ReportDiagnosticsIfNeeded(NameColonSyntax nameColon, SyntaxNodeAnalysisContext context)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
422=> expression is IdentifierNameSyntax { Parent: NameColonSyntax };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
183=> node.CheckParent<NameColonSyntax>(p => p.Name == node);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
309private static int TryDetermineParameterIndex(NameColonSyntax argumentNameColon, IMethodSymbol method)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
167NameColonSyntax nameColon => InferTypeInNameColon(nameColon), 234NameColonSyntax nameColon => InferTypeInNameColon(nameColon, token), 1636private IEnumerable<TypeInferenceInfo> InferTypeInNameColon(NameColonSyntax nameColon, SyntaxToken previousToken) 1833private IEnumerable<TypeInferenceInfo> InferTypeInNameColon(NameColonSyntax nameColon)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (2)
17370var nc = nodes.OfType<NameColonSyntax>().ElementAt(0);
Microsoft.CodeAnalysis.CSharp.Features (11)
ChangeSignature\UnifiedArgumentSyntax.cs (4)
41Debug.Assert(nameColonSyntax is NameColonSyntax); 44? Create(argument.WithNameColon((NameColonSyntax)nameColonSyntax)) 45: Create(((AttributeArgumentSyntax)_argument).WithNameColon((NameColonSyntax)nameColonSyntax)); 49=> NameColon == null ? string.Empty : ((NameColonSyntax)NameColon).Name.Identifier.ValueText;
ConvertAnonymousType\CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
47private static NameColonSyntax? ConvertName(NameEqualsSyntax? nameEquals)
ConvertTupleToStruct\CSharpConvertTupleToStructCodeRefactoringProvider.cs (2)
38private static NameColonSyntax? ChangeName(NameColonSyntax? nameColon, string name)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (1)
187if (node is IdentifierNameSyntax { Parent: not NameColonSyntax } identifierName &&
src\Analyzers\CSharp\Analyzers\UseInferredMemberName\CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
29ReportDiagnosticsIfNeeded((NameColonSyntax)context.Node, context); 37private void ReportDiagnosticsIfNeeded(NameColonSyntax nameColon, SyntaxNodeAnalysisContext context)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
309private static int TryDetermineParameterIndex(NameColonSyntax argumentNameColon, IMethodSymbol method)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\NonTrailingNamedArgumentsTests.cs (4)
51var firstNamedArgA = nodes.OfType<NameColonSyntax>().ElementAt(0); 63var secondNamedArgA = nodes.OfType<NameColonSyntax>().ElementAt(1);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (7)
10377=> SyntaxFactory.Argument(default(NameColonSyntax), default(SyntaxToken), GenerateIdentifierName()); 10382private static NameColonSyntax GenerateNameColon() 10707=> SyntaxFactory.AttributeArgument(default(NameEqualsSyntax), default(NameColonSyntax), GenerateIdentifierName()); 11556var node = GenerateNameColon(); 11560var newNode = node.WithName(node.Name).WithColonToken(node.ColonToken); 15425var oldNode = GenerateNameColon(); 15441var oldNode = GenerateNameColon();
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
422=> expression is IdentifierNameSyntax { Parent: NameColonSyntax };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
183=> node.CheckParent<NameColonSyntax>(p => p.Name == node);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
167NameColonSyntax nameColon => InferTypeInNameColon(nameColon), 234NameColonSyntax nameColon => InferTypeInNameColon(nameColon, token), 1636private IEnumerable<TypeInferenceInfo> InferTypeInNameColon(NameColonSyntax nameColon, SyntaxToken previousToken) 1833private IEnumerable<TypeInferenceInfo> InferTypeInNameColon(NameColonSyntax nameColon)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
242if (token.IsKind(SyntaxKind.ColonToken) && token.Parent is NameColonSyntax)