224 references to IsParentKind
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (2)
515
&& !baseMethodDeclarationNode.
IsParentKind
(SyntaxKind.InterfaceDeclaration);
800
&& accessorDeclarationNode.Parent.
IsParentKind
(SyntaxKind.PropertyDeclaration)
CompleteStatement\CompleteStatementCommandHandler.cs (2)
255
if (currentNode.IsKind(SyntaxKind.EqualsValueClause) && currentNode.
IsParentKind
(SyntaxKind.PropertyDeclaration))
268
method.
IsParentKind
(SyntaxKind.InterfaceDeclaration))
Microsoft.CodeAnalysis.CSharp.Features (88)
AddImport\CSharpAddImportFeatureService.cs (6)
119
if (!nameNode.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression) &&
120
!nameNode.
IsParentKind
(SyntaxKind.MemberBindingExpression))
127
if (memberAccess.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression) ||
128
memberAccess.
IsParentKind
(SyntaxKind.ElementAccessExpression) ||
129
memberBinding.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression) ||
130
memberBinding.
IsParentKind
(SyntaxKind.ElementAccessExpression))
BraceCompletion\InterpolationBraceCompletionService.cs (1)
72
return token.Parent.IsKind(SyntaxKind.InterpolatedStringExpression) || token.Parent.
IsParentKind
(SyntaxKind.InterpolatedStringExpression);
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.cs (1)
53
return !simple.
IsParentKind
(SyntaxKind.QualifiedName);
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
251
if (node.
IsParentKind
(SyntaxKind.CastExpression))
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
256
TypeSyntax type when originalReceiver.
IsParentKind
(IsExpression) => TypePattern(type),
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (3)
480
if (token.Parent.
IsParentKind
(SyntaxKind.IsExpression))
489
else if (token.Parent.
IsParentKind
(SyntaxKind.CaseSwitchLabel))
498
else if (token.Parent.
IsParentKind
(SyntaxKind.DeclarationPattern))
Completion\CompletionProviders\ExternAliasCompletionProvider.cs (1)
66
|| (targetToken.Parent.IsKind(SyntaxKind.IdentifierName) && targetToken.Parent.
IsParentKind
(SyntaxKind.IncompleteMember)))
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (4)
115
(token.Parent.IsKind(SyntaxKind.XmlName) && token.Parent.
IsParentKind
(SyntaxKind.XmlEmptyElement)))
118
if (token.Parent.
IsParentKind
(SyntaxKind.XmlElement) ||
119
token.Parent.Parent.
IsParentKind
(SyntaxKind.XmlElement))
137
if (token.Parent.
IsParentKind
(SyntaxKind.XmlEmptyElement) &&
Completion\KeywordRecommenders\BaseKeywordRecommender.cs (1)
53
token.Parent.
IsParentKind
(SyntaxKind.ConstructorDeclaration) &&
Completion\KeywordRecommenders\ModuleKeywordRecommender.cs (1)
27
return type == null || type.
IsParentKind
(SyntaxKind.CompilationUnit);
Completion\KeywordRecommenders\NamespaceKeywordRecommender.cs (1)
156
token.Parent.
IsParentKind
(SyntaxKind.CompilationUnit))
Completion\KeywordRecommenders\ThisKeywordRecommender.cs (1)
48
token.Parent.
IsParentKind
(SyntaxKind.ConstructorDeclaration))
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (2)
59
token.Parent.
IsParentKind
(SyntaxKind.DelegateDeclaration))
72
token.Parent.
IsParentKind
(SyntaxKind.MethodDeclaration))
Completion\KeywordRecommenders\WhileKeywordRecommender.cs (1)
42
token.Parent.
IsParentKind
(SyntaxKind.DoStatement))
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
100
if (!documentUpdateInfo.Source.
IsParentKind
(SyntaxKind.Block) &&
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
115
editor.RemoveNode(nextStatement.
IsParentKind
(SyntaxKind.GlobalStatement) ? nextStatement.GetRequiredParent() : nextStatement);
CSharpAddBracesDiagnosticAnalyzer.cs (1)
276
while (result.
IsParentKind
(SyntaxKind.ElseClause))
CSharpDeclareAsNullableCodeFixProvider.cs (3)
71
if (node.
IsParentKind
(SyntaxKind.Argument))
157
var onYield = node.
IsParentKind
(SyntaxKind.YieldReturnStatement);
279
if (node.
IsParentKind
(SyntaxKind.ArrowExpressionClause) &&
CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
312
return current.
IsParentKind
(SyntaxKind.Block)
CSharpIsAndCastCheckCodeFixProvider.cs (1)
99
newIf = originalIf.
IsParentKind
(SyntaxKind.ElseClause)
CSharpRemoveUnreachableCodeCodeFixProvider.cs (3)
84
if (!statement.
IsParentKind
(SyntaxKind.Block)
85
&& !statement.
IsParentKind
(SyntaxKind.SwitchSection)
86
&& !statement.
IsParentKind
(SyntaxKind.GlobalStatement))
CSharpRemoveUnusedValuesCodeFixProvider.cs (1)
85
return node.
IsParentKind
(SyntaxKind.Subpattern)
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
186
if (anonymousFunction.
IsParentKind
(SyntaxKind.EqualsValueClause) &&
187
anonymousFunction.Parent.
IsParentKind
(SyntaxKind.VariableDeclarator) &&
188
anonymousFunction.Parent.Parent.
IsParentKind
(SyntaxKind.VariableDeclaration) &&
Debugging\CSharpProximityExpressionsService_ExpressionTermCollector.cs (3)
189
!memberAccessExpression.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression) &&
190
!memberAccessExpression.
IsParentKind
(SyntaxKind.PointerMemberAccessExpression))
198
!memberAccessExpression.
IsParentKind
(SyntaxKind.InvocationExpression))
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (6)
2381
if (node.
IsParentKind
(SyntaxKind.CompilationUnit) || node.Parent.
IsParentKind
(SyntaxKind.CompilationUnit))
2407
if (oldNode.
IsParentKind
(SyntaxKind.CompilationUnit) || oldNode.Parent.
IsParentKind
(SyntaxKind.CompilationUnit))
2430
if (newNode.
IsParentKind
(SyntaxKind.CompilationUnit) || newNode.Parent.
IsParentKind
(SyntaxKind.CompilationUnit))
EditAndContinue\SyntaxComparer.cs (2)
659
if (node is not null && node.
IsParentKind
(SyntaxKind.CompilationUnit))
668
if (node is { Parent: { } parent } && parent.
IsParentKind
(SyntaxKind.CompilationUnit))
ExtractMethod\CSharpSelectionResult.cs (2)
173
Contract.ThrowIfFalse(last.
IsParentKind
(SyntaxKind.GlobalStatement));
174
Contract.ThrowIfFalse(last.Parent.
IsParentKind
(SyntaxKind.CompilationUnit));
ExtractMethod\CSharpSelectionValidator.cs (1)
103
|| selectionInfo.CommonRootFromOriginalSpan.
IsParentKind
(SyntaxKind.GlobalStatement))
GenerateMember\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (4)
45
if (simpleNameOrMemberAccessExpression.
IsParentKind
(SyntaxKind.InvocationExpression) ||
46
simpleNameOrMemberAccessExpression.
IsParentKind
(SyntaxKind.ObjectCreationExpression) ||
47
simpleNameOrMemberAccessExpression.
IsParentKind
(SyntaxKind.GotoStatement) ||
48
simpleNameOrMemberAccessExpression.
IsParentKind
(SyntaxKind.AliasQualifiedName))
GenerateMember\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
45
=> _invocationExpression.
IsParentKind
(SyntaxKind.RefExpression) ? RefKind.Ref : RefKind.None;
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (6)
167
if (expression.
IsParentKind
(SyntaxKind.AttributeArgument))
172
if (expression.
IsParentKind
(SyntaxKind.ConditionalAccessExpression))
177
if (expression.
IsParentKind
(SyntaxKind.IsPatternExpression))
183
expression.Parent.
IsParentKind
(SyntaxKind.Subpattern))
188
if (expression.
IsParentKind
(SyntaxKind.ConstantPattern))
200
if (node.IsLeftSideOfAssignExpression() && node.Parent.
IsParentKind
(SyntaxKind.ExpressionStatement))
GenerateType\CSharpGenerateTypeService.cs (8)
48
=> expression.
IsParentKind
(SyntaxKind.CatchDeclaration);
52
return expression.
IsParentKind
(SyntaxKind.ArrayType) &&
53
expression.Parent.
IsParentKind
(SyntaxKind.ArrayCreationExpression);
160
if (simpleName.
IsParentKind
(SyntaxKind.NameMemberCref))
187
nameOrMemberAccessExpression.Parent.
IsParentKind
(SyntaxKind.BaseList) &&
189
nameOrMemberAccessExpression.Parent.Parent.
IsParentKind
(SyntaxKind.EnumDeclaration))
338
if ((nameOrMemberAccessExpression.IsKind(SyntaxKind.SimpleMemberAccessExpression) || (nameOrMemberAccessExpression.Parent != null && nameOrMemberAccessExpression.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression)))
349
Debug.Assert(nameOrMemberAccessExpression.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression));
ImplementInterface\CSharpImplementInterfaceService.cs (1)
44
baseType.
IsParentKind
(SyntaxKind.BaseList) &&
IntroduceVariable\CSharpIntroduceVariableService.cs (4)
54
=> expression.GetAncestorOrThis<EqualsValueClauseSyntax>().
IsParentKind
(SyntaxKind.Parameter);
60
=> expression.GetAncestorOrThis<EqualsValueClauseSyntax>().
IsParentKind
(SyntaxKind.PropertyDeclaration);
97
if (!attributeDecl.
IsParentKind
(SyntaxKind.CompilationUnit))
114
if (expression.WalkUpParentheses().
IsParentKind
(SyntaxKind.ExpressionStatement))
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
364
statement.
IsParentKind
(SyntaxKind.ElseClause))
LineSeparators\CSharpLineSeparatorService.cs (1)
306
if (lastChild.
IsParentKind
(SyntaxKind.CompilationUnit))
NullableImpactingSpanWalker.cs (4)
82
if (node.
IsParentKind
(SyntaxKind.UsingDirective))
88
if (node.
IsParentKind
(SyntaxKind.SimpleBaseType))
100
if (node.
IsParentKind
(SyntaxKind.NameEquals) && node.Parent.
IsParentKind
(SyntaxKind.UsingDirective))
RemoveUnusedVariable\CSharpRemoveUnusedVariableCodeFixProvider.cs (1)
65
RemoveNode(editor, node.
IsParentKind
(SyntaxKind.GlobalStatement) ? node.Parent : node, blockFacts);
Structure\Providers\ArrowExpressionClauseStructureProvider.cs (1)
30
autoCollapse: !node.
IsParentKind
(SyntaxKind.LocalFunctionStatement)));
Structure\Providers\BlockSyntaxStructureProvider.cs (2)
45
autoCollapse: parentKind == SyntaxKind.LocalFunctionStatement && node.Parent.
IsParentKind
(SyntaxKind.GlobalStatement)));
85
if (parent.IsKind(SyntaxKind.IfStatement) && parent.
IsParentKind
(SyntaxKind.ElseClause))
Microsoft.CodeAnalysis.CSharp.Workspaces (129)
CastSimplifier.cs (1)
470
if (castNode.
IsParentKind
(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
48
=> node.
IsParentKind
(SyntaxKind.Attribute);
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (2)
65
if (identifierName.
IsParentKind
(SyntaxKind.MemberBindingExpression))
75
if (identifier.Parent.
IsParentKind
(SyntaxKind.ConditionalAccessExpression))
CSharpCodeGenerationService.cs (1)
515
else if (destinationMember is StatementSyntax statement && statement.
IsParentKind
(SyntaxKind.GlobalStatement))
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
64
(i == 0 && currentUsing.
IsParentKind
(SyntaxKind.FileScopedNamespaceDeclaration)))
CSharpSmartTokenFormatter.cs (2)
75
(endToken.Parent.
IsParentKind
(SyntaxKind.TryStatement) || endToken.Parent.
IsParentKind
(SyntaxKind.DoStatement));
CSharpSyntaxFacts.cs (10)
634
node.
IsParentKind
(SyntaxKind.NameColon) &&
635
node.Parent.
IsParentKind
(SyntaxKind.Subpattern);
647
if (identifier.Parent.
IsParentKind
(SyntaxKind.WithInitializerExpression))
653
else if (identifier.Parent.
IsParentKind
(SyntaxKind.ObjectInitializerExpression))
1173
=> node.
IsParentKind
(SyntaxKind.PostIncrementExpression) ||
1174
node.
IsParentKind
(SyntaxKind.PreIncrementExpression);
1177
=> node.
IsParentKind
(SyntaxKind.PostDecrementExpression) ||
1178
node.
IsParentKind
(SyntaxKind.PreDecrementExpression);
1264
return node.Parent.
IsParentKind
(SyntaxKind.FieldDeclaration) ||
1265
node.Parent.
IsParentKind
(SyntaxKind.EventFieldDeclaration);
CSharpTypeInferenceService.TypeInferrer.cs (8)
323
if (argument.Parent.
IsParentKind
(SyntaxKind.ImplicitElementAccess) &&
324
argument.Parent.Parent.
IsParentKind
(SyntaxKind.SimpleAssignmentExpression) &&
325
argument.Parent.Parent.Parent.
IsParentKind
(SyntaxKind.ObjectInitializerExpression) &&
1234
if (equalsValue.
IsParentKind
(SyntaxKind.Parameter) &&
1440
else if (initializerExpression.
IsParentKind
(SyntaxKind.SimpleAssignmentExpression))
1766
memberAccessExpression.Parent.
IsParentKind
(SyntaxKind.AwaitExpression))
2245
if (variableDeclaration.
IsParentKind
(SyntaxKind.UsingStatement))
2249
if (variableDeclaration.
IsParentKind
(SyntaxKind.ForStatement))
DefaultExpressionSyntaxExtensions.cs (1)
69
if (equalsValueClause.
IsParentKind
(SyntaxKind.VariableDeclarator) &&
ElasticTriviaFormattingRule.cs (1)
131
currentToken.Parent.
IsParentKind
(SyntaxKind.IfStatement))
FormattingHelpers.cs (5)
77
=> token.IsOpenParenInParameterList() && token.Parent.
IsParentKind
(SyntaxKind.ConversionOperatorDeclaration);
80
=> token.IsOpenParenInParameterList() && token.Parent.
IsParentKind
(SyntaxKind.OperatorDeclaration);
134
return node.
IsParentKind
(SyntaxKind.SimpleLambdaExpression) || node.
IsParentKind
(SyntaxKind.ParenthesizedLambdaExpression);
144
return node.
IsParentKind
(SyntaxKind.AnonymousMethodExpression);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (10)
36
=> expression.
IsParentKind
(SyntaxKind.NameMemberCref) && expression.Parent.
IsParentKind
(SyntaxKind.QualifiedCref);
100
=> name.
IsParentKind
(SyntaxKind.ExplicitInterfaceSpecifier);
181
if (expression.
IsParentKind
(SyntaxKind.ConstantPattern))
275
if (!expr.
IsParentKind
(SyntaxKind.Argument))
386
return nameEquals.
IsParentKind
(SyntaxKind.AttributeArgument);
470
if (expression is LiteralExpressionSyntax && !expression.
IsParentKind
(SyntaxKind.UnaryMinusExpression))
583
if (!(expression is LiteralExpressionSyntax && expression.
IsParentKind
(SyntaxKind.UnaryMinusExpression)))
624
if ((expression.
IsParentKind
(SyntaxKind.NameEquals) && expression.Parent.
IsParentKind
(SyntaxKind.AttributeArgument)) ||
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (2)
49
if (node.
IsParentKind
(kind))
758
equalsValue.
IsParentKind
(SyntaxKind.VariableDeclarator) &&
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (6)
18
if (node.
IsParentKind
(SyntaxKind.MethodDeclaration) ||
19
node.
IsParentKind
(SyntaxKind.LocalFunctionStatement) ||
20
node.
IsParentKind
(SyntaxKind.ConstructorDeclaration) ||
21
node.
IsParentKind
(SyntaxKind.DelegateDeclaration))
29
node.
IsParentKind
(SyntaxKind.OperatorDeclaration) ||
30
node.
IsParentKind
(SyntaxKind.ConversionOperatorDeclaration);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (13)
117
return statement != null && !statement.
IsParentKind
(SyntaxKind.GlobalStatement) &&
132
if (!token.Parent.
IsParentKind
(SyntaxKind.TryStatement) &&
133
!token.Parent.
IsParentKind
(SyntaxKind.DoStatement))
139
token.Parent.
IsParentKind
(SyntaxKind.ElseClause) ||
140
token.Parent.
IsParentKind
(SyntaxKind.FinallyClause) ||
141
token.Parent.
IsParentKind
(SyntaxKind.CatchClause) ||
142
token.Parent.
IsParentKind
(SyntaxKind.SwitchSection))
210
memberDeclaration.
IsParentKind
(SyntaxKind.CompilationUnit))
229
memberDeclaration.
IsParentKind
(SyntaxKind.CompilationUnit))
468
if (targetToken.Parent.
IsParentKind
(SyntaxKind.ObjectCreationExpression) ||
469
targetToken.Parent.
IsParentKind
(SyntaxKind.BaseConstructorInitializer) ||
470
targetToken.Parent.
IsParentKind
(SyntaxKind.ThisConstructorInitializer))
478
if (targetToken.Parent.
IsParentKind
(SyntaxKind.InvocationExpression) && !targetToken.IsInvocationOfVarExpression())
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (27)
60
token.Parent.
IsParentKind
(SyntaxKind.Attribute))
68
token.Parent.
IsParentKind
(SyntaxKind.Attribute))
115
(parent is MemberDeclarationSyntax && parent.
IsParentKind
(SyntaxKind.CompilationUnit)))
510
if (token.Parent.
IsParentKind
(SyntaxKind.CompilationUnit))
832
token.Parent.
IsParentKind
(SyntaxKind.SimpleBaseType) &&
833
token.Parent.Parent.
IsParentKind
(SyntaxKind.BaseList))
1007
if (name.
IsParentKind
(SyntaxKind.LessThanExpression) &&
1009
conditional.
IsParentKind
(SyntaxKind.ExpressionStatement) &&
1010
conditional.Parent.
IsParentKind
(SyntaxKind.GlobalStatement))
1217
token.Parent.
IsParentKind
(SyntaxKind.ParenthesizedLambdaExpression))
1264
return parent.IsKind(SyntaxKind.ParameterList) && parent.
IsParentKind
(SyntaxKind.AnonymousMethodExpression);
1407
leftToken.Parent.
IsParentKind
(SyntaxKind.Subpattern))
1593
leftToken.Parent.
IsParentKind
(SyntaxKind.ParenthesizedVariableDesignation))
1784
if (parent.
IsParentKind
(SyntaxKind.VariableDeclaration) &&
2068
if (equalsValue.
IsParentKind
(SyntaxKind.VariableDeclarator) &&
2069
equalsValue.Parent.
IsParentKind
(SyntaxKind.VariableDeclaration))
2087
if (equalsValue.
IsParentKind
(SyntaxKind.EnumMemberDeclaration))
2093
if (equalsValue.
IsParentKind
(SyntaxKind.Parameter))
2111
token.Parent.
IsParentKind
(SyntaxKind.AttributeArgument))
2119
token.Parent.
IsParentKind
(SyntaxKind.AttributeArgument))
2200
token.Parent.
IsParentKind
(SyntaxKind.UsingDirective))
2340
if (type.
IsParentKind
(SyntaxKind.VariableDeclaration) &&
2459
if (token.Parent.
IsParentKind
(SyntaxKind.ParenthesizedExpression))
2471
token.Parent.
IsParentKind
(SyntaxKind.Argument))
2952
if (block.
IsParentKind
(SyntaxKind.TryStatement) ||
2953
block.
IsParentKind
(SyntaxKind.CatchClause))
3000
token.Parent.
IsParentKind
(SyntaxKind.EnumDeclaration);
NameSyntaxExtensions.cs (4)
54
if (nameSyntax.
IsParentKind
(SyntaxKind.AliasQualifiedName) ||
55
nameSyntax.
IsParentKind
(SyntaxKind.NameColon) ||
56
nameSyntax.
IsParentKind
(SyntaxKind.NameEquals) ||
57
nameSyntax.
IsParentKind
(SyntaxKind.TypeParameterConstraintClause))
ParenthesizedExpressionSyntaxExtensions.cs (2)
251
nodeParent.
IsParentKind
(SyntaxKind.CasePatternSwitchLabel))
556
(binaryExpression.
IsParentKind
(SyntaxKind.Argument) || binaryExpression.Parent is InitializerExpressionSyntax))
Rename\CSharpRenameRewriterLanguageService.cs (1)
754
token.Parent.
IsParentKind
(SyntaxKind.InvocationExpression) &&
SemanticModelExtensions.cs (20)
226
variableDeclaration.
IsParentKind
(SyntaxKind.FieldDeclaration))
233
if (type.
IsParentKind
(SyntaxKind.ObjectCreationExpression) &&
234
type.Parent.
IsParentKind
(SyntaxKind.EqualsValueClause) &&
235
type.Parent.Parent.
IsParentKind
(SyntaxKind.VariableDeclarator) &&
237
variableDeclaration.
IsParentKind
(SyntaxKind.FieldDeclaration))
252
if (type.
IsParentKind
(SyntaxKind.DelegateDeclaration) ||
253
type.
IsParentKind
(SyntaxKind.MethodDeclaration) ||
254
type.
IsParentKind
(SyntaxKind.PropertyDeclaration) ||
255
type.
IsParentKind
(SyntaxKind.EventDeclaration) ||
256
type.
IsParentKind
(SyntaxKind.IndexerDeclaration) ||
257
type.
IsParentKind
(SyntaxKind.OperatorDeclaration))
273
if (type.
IsParentKind
(SyntaxKind.Parameter) && type.Parent.
IsParentKind
(SyntaxKind.ParameterList))
275
if (type.Parent.Parent.
IsParentKind
(SyntaxKind.DelegateDeclaration) ||
276
type.Parent.Parent.
IsParentKind
(SyntaxKind.MethodDeclaration) ||
277
type.Parent.Parent.
IsParentKind
(SyntaxKind.IndexerDeclaration) ||
278
type.Parent.Parent.
IsParentKind
(SyntaxKind.OperatorDeclaration))
284
if (type.Parent.Parent.
IsParentKind
(SyntaxKind.ConstructorDeclaration))
296
variableDeclaration.
IsParentKind
(SyntaxKind.EventFieldDeclaration))
306
if (type.
IsParentKind
(SyntaxKind.TypeConstraint))
SimpleNameSyntaxExtensions.cs (1)
16
Debug.Assert(name.IsSimpleMemberAccessExpressionName() || name.IsMemberBindingExpressionName() || name.IsRightSideOfQualifiedName() || name.
IsParentKind
(SyntaxKind.NameMemberCref));
Simplification\CSharpSimplificationService.Expander.cs (3)
77
argument.
IsParentKind
(SyntaxKind.ArgumentList) &&
360
if ((node.Kind() == SyntaxKind.GreaterThanExpression || node.Kind() == SyntaxKind.RightShiftExpression) && !node.
IsParentKind
(SyntaxKind.ParenthesizedExpression))
670
originalSimpleName.
IsParentKind
(SyntaxKind.NameMemberCref) ||
Simplification\Reducers\CSharpMiscellaneousReducer.cs (2)
42
if (parameterSyntax.
IsParentKind
(SyntaxKind.ParameterList) &&
43
parameterSyntax.Parent.
IsParentKind
(SyntaxKind.ParenthesizedLambdaExpression))
Simplification\Simplifiers\MemberAccessExpressionSimplifier.cs (2)
45
if (parent.
IsParentKind
(SyntaxKind.SimpleMemberAccessExpression))
51
if (!parent.
IsParentKind
(SyntaxKind.ParenthesizedExpression))
Simplification\Simplifiers\NameSimplifier.cs (1)
634
expression.
IsParentKind
(SyntaxKind.UsingDirective) &&
TokenBasedFormattingRule.cs (2)
287
previousToken.Parent.
IsParentKind
(SyntaxKind.Parameter))
465
previousToken.Parent?.
IsParentKind
(SyntaxKind.ArrayType) == true)
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (3)
1847
namespaceNode = usingDirective.
IsParentKind
(SyntaxKind.CompilationUnit)
2473
if (member.
IsParentKind
(SyntaxKind.InterfaceDeclaration))
3540
if (propertyDeclaration.
IsParentKind
(SyntaxKind.InterfaceDeclaration))