799 references to RawKind
GenerateDocumentationAndConfigFiles (98)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (3)
78var qualifiedNameSyntaxKind = generator.QualifiedName(generator.IdentifierName("ignored"), generator.IdentifierName("ignored")).RawKind; 79var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.IdentifierName("ignored"), "ignored").RawKind; 87if (expression.RawKind == qualifiedNameSyntaxKind)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
249throw ExceptionUtilities.UnexpectedValue(pattern.RawKind); 478if (expression.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression || 484expression.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
76assignmentOperation.Syntax.RawKind == semanticFacts.SyntaxFacts.SyntaxKinds.SimpleAssignmentExpression)
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (1)
160token.Parent.Parent.RawKind == (int)SyntaxKind.AddExpression)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (1)
46while (node?.Parent?.RawKind == (int)SyntaxKind.ParenthesizedExpression)
Microsoft.CodeAnalysis (3)
Syntax\SeparatedSyntaxList.cs (1)
277if (this[i].RawKind == rawKind)
Syntax\SyntaxList`1.cs (1)
543if (child.RawKind == rawKind)
Syntax\SyntaxNodeOrToken.cs (1)
93public int RawKind => _token?.RawKind ?? _nodeOrParent?.RawKind ?? 0;
Microsoft.CodeAnalysis.Analyzers (98)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (3)
78var qualifiedNameSyntaxKind = generator.QualifiedName(generator.IdentifierName("ignored"), generator.IdentifierName("ignored")).RawKind; 79var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.IdentifierName("ignored"), "ignored").RawKind; 87if (expression.RawKind == qualifiedNameSyntaxKind)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
249throw ExceptionUtilities.UnexpectedValue(pattern.RawKind); 478if (expression.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression || 484expression.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
76assignmentOperation.Syntax.RawKind == semanticFacts.SyntaxFacts.SyntaxKinds.SimpleAssignmentExpression)
Microsoft.CodeAnalysis.AnalyzerUtilities (91)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
Microsoft.CodeAnalysis.CodeStyle (99)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
76var parentKind = parenthesizedExpression.Parent?.RawKind; 77var childKind = child.RawKind;
src\roslyn\src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
68var isEquals = syntaxKinds.ReferenceEqualsExpression == condition.RawKind; 69var isNotEquals = syntaxKinds.ReferenceNotEqualsExpression == condition.RawKind;
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
335if (this.SyntaxFacts.SyntaxKinds.CollectionInitializerExpression == argumentExpression.RawKind)
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
99var binaryKind = _syntaxFacts.SyntaxKinds.Convert<TSyntaxKind>(binaryExpression.RawKind);
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
294isEquals = syntaxKinds.ReferenceEqualsExpression == condition.RawKind; 295var isNotEquals = syntaxKinds.ReferenceNotEqualsExpression == condition.RawKind;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
Microsoft.CodeAnalysis.CodeStyle.Fixes (11)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
172if (expression.Parent?.RawKind == syntaxFacts.SyntaxKinds.AddressOfExpression &&
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
446if (syntaxKinds.AddressOfExpression == SimpleNameOrMemberAccessExpressionOpt.Parent?.RawKind)
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (3)
240var qualifiedNameSyntaxKind = generator.QualifiedName(generator.IdentifierName("ignored"), generator.IdentifierName("ignored")).RawKind; 241var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.IdentifierName("ignored"), "ignored").RawKind; 249if (expression.RawKind == qualifiedNameSyntaxKind)
src\roslyn\src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (1)
81var assignmentOpKind = _binaryToAssignmentMap[syntaxKinds.Convert<TSyntaxKind>(rightOfAssign.RawKind)];
src\roslyn\src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
182while (sourceSyntax is { Parent.RawKind: var kind } && kind == suppressKind)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
249throw ExceptionUtilities.UnexpectedValue(pattern.RawKind); 478if (expression.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression || 484expression.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
76assignmentOperation.Syntax.RawKind == semanticFacts.SyntaxFacts.SyntaxKinds.SimpleAssignmentExpression)
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder.IdentifierUsedAsValueFinder.cs (4)
77!(id.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 135case GotoStatementSyntax { RawKind: (int)SyntaxKind.GotoStatement }: 157!(expression.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 224case MemberAccessExpressionSyntax { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression } memberAccess when memberAccess.Expression == id:
Binder\Binder.ValueChecks.cs (1)
1297return parenthesized.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.SubtractExpression } binary &&
Binder\Binder_Expressions.cs (1)
7672Debug.Assert((left.Parent is MemberAccessExpressionSyntax { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression } memberAccess && memberAccess.Expression == left) ||
Binder\Binder_Invocation.cs (1)
254if (node.Expression is MemberAccessExpressionSyntax { Expression: InvocationExpressionSyntax receiver, RawKind: (int)SyntaxKind.SimpleMemberAccessExpression } && !receiver.MayBeNameofOperator())
Compilation\MemberSemanticModel.cs (4)
2235case PostfixUnaryExpressionSyntax { RawKind: (int)SyntaxKind.SuppressNullableWarningExpression } n: 2362case { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression, Parent.RawKind: (int)SyntaxKind.InvocationExpression }: 2368case { RawKind: (int)SyntaxKind.ComplexElementInitializerExpression }:
Compiler\MethodCompiler.cs (4)
2197case GotoStatementSyntax { RawKind: (int)SyntaxKind.GotoStatement }: 2205!(expression.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 2245!(id.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 2292if (parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && isExpression.Right == child)
CSharpExtensions.cs (3)
49return node?.RawKind == (int)kind; 205/// Returns <see cref="SyntaxKind"/> for <see cref="SyntaxNode"/> from <see cref="SyntaxNode.RawKind"/> property. 209var rawKind = node.RawKind;
Declarations\DeclarationTreeBuilder.cs (2)
718StructDeclarationSyntax { RawKind: not (int)SyntaxKind.UnionDeclaration }; 734else if (node is StructDeclarationSyntax { RawKind: (int)SyntaxKind.UnionDeclaration })
FlowAnalysis\NullableWalker.cs (1)
911if (method is SourceMemberMethodSymbol { SyntaxNode: ConstructorDeclarationSyntax { Initializer: { RawKind: var initializerKind } } })
Symbols\Source\SourcePropertySymbolBase.cs (1)
506if (node.ArgumentList?.Arguments is not [{ NameColon: null, NameEquals: null, Expression: LiteralExpressionSyntax { RawKind: (int)SyntaxKind.StringLiteralExpression } }])
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (3)
50if (accessor is (SyntaxKind.GetAccessorDeclaration) { Body.Statements: [ReturnStatementSyntax { Expression.RawKind: (int)SyntaxKind.FieldExpression }] } 51or (SyntaxKind.GetAccessorDeclaration) { ExpressionBody.Expression.RawKind: (int)SyntaxKind.FieldExpression }) 75Left.RawKind: (int)SyntaxKind.FieldExpression,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
221Initializer: null or { RawKind: (int)SyntaxKind.CollectionInitializerExpression }
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
886RawKind: (int)SyntaxKind.SimpleMemberAccessExpression,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
46return accessorList is { Accessors: [{ AttributeLists.Count: 0, RawKind: (int)SyntaxKind.GetAccessorDeclaration } accessor] }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
517return expression is { Parent.RawKind: not (int)SyntaxKind.ConditionalAccessExpression };
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\UseAutoPropertyRewriter.cs (1)
47Parent: InitializerExpressionSyntax { RawKind: (int)SyntaxKind.ObjectInitializerExpression }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
948{ Parent.RawKind: (int)SyntaxKind.FunctionPointerParameter } => true, 950{ Parent: TypeSyntax { Parent.RawKind: (int)SyntaxKind.FunctionPointerParameter } } => true,
Microsoft.CodeAnalysis.CSharp.Features (12)
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (1)
52if (forStatement is { Declaration.Variables: [{ Initializer: not null } declarator], Condition.RawKind: (int)SyntaxKind.LessThanExpression, Incrementors.Count: 1 })
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
1356Debug.Assert(oldNode.RawKind == newNode.RawKind); 2646Debug.Assert(edit.Kind != EditKind.Update || edit.OldNode.RawKind == edit.NewNode.RawKind);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (3)
50if (accessor is (SyntaxKind.GetAccessorDeclaration) { Body.Statements: [ReturnStatementSyntax { Expression.RawKind: (int)SyntaxKind.FieldExpression }] } 51or (SyntaxKind.GetAccessorDeclaration) { ExpressionBody.Expression.RawKind: (int)SyntaxKind.FieldExpression }) 75Left.RawKind: (int)SyntaxKind.FieldExpression,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
221Initializer: null or { RawKind: (int)SyntaxKind.CollectionInitializerExpression }
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
886RawKind: (int)SyntaxKind.SimpleMemberAccessExpression,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (1)
46return accessorList is { Accessors: [{ AttributeLists.Count: 0, RawKind: (int)SyntaxKind.GetAccessorDeclaration } accessor] }
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\UseAutoPropertyRewriter.cs (1)
47Parent: InitializerExpressionSyntax { RawKind: (int)SyntaxKind.ObjectInitializerExpression }
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (5)
Microsoft.CodeQuality.Analyzers\Maintainability\CSharpUseCrossPlatformIntrinsicsFixer.cs (2)
36Debug.Fail($"Found unexpected node kind: {currentNode.RawKind}"); 60Debug.Fail($"Found unexpected node kind: {currentNode.RawKind}");
Microsoft.CodeQuality.Analyzers\QualityGuidelines\CSharpDoNotInitializeUnnecessarilyAnalyzer.cs (1)
14=> op.Syntax?.Parent?.RawKind == (int)CodeAnalysis.CSharp.SyntaxKind.SuppressNullableWarningExpression;
Microsoft.NetCore.Analyzers\Performance\CSharpPreferDictionaryTryMethodsOverContainsKeyGuardFixer.cs (2)
172case PostfixUnaryExpressionSyntax { RawKind: (int)SyntaxKind.PostDecrementExpression } post: 177case PostfixUnaryExpressionSyntax { RawKind: (int)SyntaxKind.PostIncrementExpression } post:
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
517return expression is { Parent.RawKind: not (int)SyntaxKind.ConditionalAccessExpression };
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
948{ Parent.RawKind: (int)SyntaxKind.FunctionPointerParameter } => true, 950{ Parent: TypeSyntax { Parent.RawKind: (int)SyntaxKind.FunctionPointerParameter } } => true,
Microsoft.CodeAnalysis.Features (40)
AddImport\SymbolReferenceFinder.cs (1)
166hasIncompleteParentMember = nameNode.GetRequiredParent().RawKind == syntaxFacts.SyntaxKinds.IncompleteMember;
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
38var from = fromNodes.FirstOrDefault(n => n.RawKind == FromKind);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
95lastArgumentExpression.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (4)
6854Debug.Assert(otherNode.RawKind == rightNode.RawKind); 6913if (rightNode != null && leftNode.RawKind != rightNode.RawKind)
EditAndContinue\RudeEditDiagnostic.cs (1)
37: this(kind, span, (ushort)(node != null ? node.RawKind : 0), arguments ?? [])
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (1)
59if (interpolation?.RawKind != syntaxFacts.SyntaxKinds.Interpolation)
EmbeddedLanguages\EmbeddedLanguageDetector.cs (2)
97syntaxFacts.SyntaxKinds.AddExpression == token.Parent.Parent.RawKind) 167if (interpolation?.RawKind != syntaxFacts.SyntaxKinds.Interpolation)
ExtractMethod\MethodExtractor.CodeGenerator.cs (2)
209mappedMember = mappedMember.Parent?.RawKind == syntaxKinds.GlobalStatement 213mappedMember = mappedMember.RawKind == syntaxKinds.PrimaryConstructorBaseType
ExtractMethod\MethodExtractor.cs (1)
121var mappedPoint = insertionPointNode.RawKind == syntaxKinds.GlobalStatement
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
228if (syntaxKindsService.InterpolatedStringExpression == expression.RawKind && value is string)
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (4)
120if (ifDirective.RawKind != syntaxKinds.IfDirectiveTrivia) 128conditionalDirectives[1].RawKind != syntaxKinds.ElseDirectiveTrivia || 129conditionalDirectives[2].RawKind != syntaxKinds.EndIfDirectiveTrivia) 279GetNearestParentJumpStatementKind(ifNode).Equals(syntaxKinds.Convert<TSyntaxKind>(ifBodySingleExitPointOpt.RawKind)))
InvertLogical\AbstractInvertLogicalCodeRefactoringProvider.cs (3)
55while (expression.Parent?.RawKind == expression.RawKind) 73var title = GetTitle(syntaxKinds, expression.RawKind);
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
277if (current.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression)
SpellCheck\AbstractSpellCheckSpanService.cs (1)
102token.Parent?.RawKind == _syntaxKinds.InterpolatedStringText)
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (1)
89while (current.Parent?.RawKind == syntaxKind)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
76var parentKind = parenthesizedExpression.Parent?.RawKind; 77var childKind = child.RawKind;
src\roslyn\src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
68var isEquals = syntaxKinds.ReferenceEqualsExpression == condition.RawKind; 69var isNotEquals = syntaxKinds.ReferenceNotEqualsExpression == condition.RawKind;
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
335if (this.SyntaxFacts.SyntaxKinds.CollectionInitializerExpression == argumentExpression.RawKind)
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
99var binaryKind = _syntaxFacts.SyntaxKinds.Convert<TSyntaxKind>(binaryExpression.RawKind);
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
294isEquals = syntaxKinds.ReferenceEqualsExpression == condition.RawKind; 295var isNotEquals = syntaxKinds.ReferenceNotEqualsExpression == condition.RawKind;
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
172if (expression.Parent?.RawKind == syntaxFacts.SyntaxKinds.AddressOfExpression &&
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
446if (syntaxKinds.AddressOfExpression == SimpleNameOrMemberAccessExpressionOpt.Parent?.RawKind)
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (3)
240var qualifiedNameSyntaxKind = generator.QualifiedName(generator.IdentifierName("ignored"), generator.IdentifierName("ignored")).RawKind; 241var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.IdentifierName("ignored"), "ignored").RawKind; 249if (expression.RawKind == qualifiedNameSyntaxKind)
src\roslyn\src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (1)
81var assignmentOpKind = _binaryToAssignmentMap[syntaxKinds.Convert<TSyntaxKind>(rightOfAssign.RawKind)];
src\roslyn\src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
182while (sourceSyntax is { Parent.RawKind: var kind } && kind == suppressKind)
Microsoft.CodeAnalysis.ResxSourceGenerator (91)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
Microsoft.CodeAnalysis.VisualBasic (3)
VisualBasicExtensions.vb (3)
52Return node IsNot Nothing AndAlso node.RawKind = kind 205''' Returns <see cref="SyntaxKind"/> for <see cref="SyntaxNode"/> from <see cref="SyntaxNode.RawKind"/> property. 209Dim rawKind = node.RawKind
Microsoft.CodeAnalysis.VisualBasic.Features (4)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (4)
402If oldStatement.RawKind <> newStatement.RawKind Then 857Debug.Assert(oldNode.RawKind = newNode.RawKind)
Microsoft.CodeAnalysis.Workspaces (102)
Differencing\AbstractSyntaxComparer.cs (3)
183var label = Classify(node.RawKind, node, out var isLeaf); 196=> Classify(node.RawKind, node, out _) != IgnoredNode; 201=> Classify(node.RawKind, node, out _);
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
270if (node is null || node.RawKind != implicitObjectKind)
FindSymbols\FindReferences\Finders\CrefTypeParameterSymbolReferenceFinder.cs (1)
60var attribute = token.GetAncestors<SyntaxNode>().FirstOrDefault(n => syntaxFacts.SyntaxKinds.XmlCrefAttribute == n.RawKind);
Shared\Extensions\SemanticModelExtensions.cs (2)
95(tokenParent?.RawKind == syntaxKinds.UsingStatement || tokenParent?.RawKind == syntaxKinds.LocalDeclarationStatement))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
249throw ExceptionUtilities.UnexpectedValue(pattern.RawKind); 478if (expression.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression || 484expression.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
76assignmentOperation.Syntax.RawKind == semanticFacts.SyntaxFacts.SyntaxKinds.SimpleAssignmentExpression)
Roslyn.Diagnostics.Analyzers (102)
AbstractRunIterations`1.cs (4)
139if (newNode.RawKind != node.RawKind 140&& newNode.ChildNodes().FirstOrDefault()?.RawKind == node.RawKind)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (3)
78var qualifiedNameSyntaxKind = generator.QualifiedName(generator.IdentifierName("ignored"), generator.IdentifierName("ignored")).RawKind; 79var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.IdentifierName("ignored"), "ignored").RawKind; 87if (expression.RawKind == qualifiedNameSyntaxKind)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (2)
67if (parent?.RawKind == syntaxFacts.SyntaxKinds.TypeOfExpression || 68parent?.RawKind == syntaxFacts.SyntaxKinds.SizeOfExpression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 923if (poppedDirective.RawKind == syntaxKinds.IfDirectiveTrivia)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
142RoslynDebug.Assert(false, $"Unexpected XML syntax kind {attribute.RawKind}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (85)
712=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SkippedTokensTrivia; 752=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AliasQualifiedName; 755=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.GenericName; 758=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IdentifierName; 761=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QualifiedName; 768=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleType; 775=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CharacterLiteralExpression; 778=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DefaultLiteralExpression; 781=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression; 784=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NumericLiteralExpression; 787=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NullLiteralExpression; 790=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StringLiteralExpression; 793=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression; 800=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ArrayCreationExpression; 803=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AwaitExpression; 806=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.BaseExpression; 809=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalExpression; 812=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConditionalAccessExpression; 815=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldExpression; 818=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitArrayCreationExpression; 821=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitObjectCreationExpression; 824=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexExpression; 827=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringExpression; 830=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Interpolation; 833=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterpolatedStringText; 836=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InvocationExpression; 839=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsTypeExpression; 842=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsNotTypeExpression; 845=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IsPatternExpression; 848=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalAndExpression; 851=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalOrExpression; 854=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LogicalNotExpression; 857=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ObjectCreationExpression; 860=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedExpression; 863=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.QueryExpression; 866=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RangeExpression; 869=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RefExpression; 872=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SimpleMemberAccessExpression; 875=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.SuppressNullableWarningExpression; 878=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThisExpression; 881=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowExpression; 884=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TupleExpression; 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement); 894=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.AndPattern; 897=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstantPattern; 900=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.DeclarationPattern; 903=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ListPattern; 906=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.NotPattern; 909=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.OrPattern; 912=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ParenthesizedPattern; 915=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RecursivePattern; 918=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.RelationalPattern; 921=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypePattern; 924=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VarPattern; 931=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionStatement; 934=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForEachStatement; 937=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ForStatement; 940=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IfStatement; 943=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalDeclarationStatement; 946=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LocalFunctionStatement; 949=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.LockStatement; 952=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ReturnStatement; 955=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ThrowStatement; 958=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.UsingStatement; 961=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.WhileStatement; 964=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.YieldReturnStatement; 971=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Attribute; 974=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ClassDeclaration; 977=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.CollectionExpression; 980=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ConstructorDeclaration; 983=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EnumDeclaration; 989=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.InterfaceDeclaration; 992=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.Parameter; 995=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeConstraint; 998=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.VariableDeclarator; 1001=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.FieldDeclaration; 1004=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PropertyDeclaration; 1007=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.StructDeclaration; 1010=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.TypeArgumentList; 1017=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ElseClause; 1019=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.EqualsValueClause; 1026=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ExpressionElement; 1029=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.ImplicitElementAccess; 1032=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.IndexerMemberCref; 1035=> node != null && node.RawKind == syntaxFacts.SyntaxKinds.PrimaryConstructorBaseType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
249throw ExceptionUtilities.UnexpectedValue(pattern.RawKind); 478if (expression.RawKind == syntaxFacts.SyntaxKinds.TrueLiteralExpression || 484expression.RawKind == syntaxFacts.SyntaxKinds.FalseLiteralExpression ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
76assignmentOperation.Syntax.RawKind == semanticFacts.SyntaxFacts.SyntaxKinds.SimpleAssignmentExpression)
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
517return expression is { Parent.RawKind: not (int)SyntaxKind.ConditionalAccessExpression };
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
948{ Parent.RawKind: (int)SyntaxKind.FunctionPointerParameter } => true, 950{ Parent: TypeSyntax { Parent.RawKind: (int)SyntaxKind.FunctionPointerParameter } } => true,