81 references to TypeConstraint
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Constraints.cs (1)
238
case SyntaxKind.
TypeConstraint
:
Syntax\SyntaxFacts.cs (1)
163
case
TypeConstraint
:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
308
if (type.IsParentKind(SyntaxKind.
TypeConstraint
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
162
public int TypeConstraint => (int)SyntaxKind.
TypeConstraint
;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\LocalFunctionTests.cs (2)
7641
.Where(i => i.Ancestors().Any(a => a.Kind() is SyntaxKind.Attribute or SyntaxKind.
TypeConstraint
or SyntaxKind.DefaultExpression or SyntaxKind.InvocationExpression or SyntaxKind.EqualsValueClause))
8686
.Where(i => i.Ancestors().Any(a => a.IsKind(SyntaxKind.Attribute) || a.IsKind(SyntaxKind.
TypeConstraint
) || a.IsKind(SyntaxKind.DefaultExpression) || a.IsKind(SyntaxKind.InvocationExpression)))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (72)
Parsing\AllowsConstraintParsing.cs (13)
107
N(SyntaxKind.
TypeConstraint
);
212
N(SyntaxKind.
TypeConstraint
);
266
N(SyntaxKind.
TypeConstraint
);
325
N(SyntaxKind.
TypeConstraint
);
333
N(SyntaxKind.
TypeConstraint
);
402
N(SyntaxKind.
TypeConstraint
);
1293
N(SyntaxKind.
TypeConstraint
);
1350
N(SyntaxKind.
TypeConstraint
);
1407
N(SyntaxKind.
TypeConstraint
);
1525
N(SyntaxKind.
TypeConstraint
);
1707
N(SyntaxKind.
TypeConstraint
);
1764
N(SyntaxKind.
TypeConstraint
);
1821
N(SyntaxKind.
TypeConstraint
);
Parsing\DeclarationParsingTests.cs (20)
1132
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[0].Kind());
1173
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[0].Kind());
1368
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[1].Kind());
1417
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[0].Kind());
1472
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[0].Kind());
1483
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[1].Constraints[0].Kind());
1518
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[0].Kind());
1527
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[1].Constraints[0].Kind());
1573
Assert.Equal(SyntaxKind.
TypeConstraint
, cs.ConstraintClauses[0].Constraints[1].Kind());
3445
Assert.Equal(SyntaxKind.
TypeConstraint
, ms.ConstraintClauses[0].Constraints[0].Kind());
6770
M(SyntaxKind.
TypeConstraint
);
6835
N(SyntaxKind.
TypeConstraint
);
8505
N(SyntaxKind.
TypeConstraint
);
9233
N(SyntaxKind.
TypeConstraint
);
9270
N(SyntaxKind.
TypeConstraint
);
9286
N(SyntaxKind.
TypeConstraint
);
9600
N(SyntaxKind.
TypeConstraint
);
9639
N(SyntaxKind.
TypeConstraint
);
9655
N(SyntaxKind.
TypeConstraint
);
9703
N(SyntaxKind.
TypeConstraint
);
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (24)
377
N(SyntaxKind.
TypeConstraint
);
480
N(SyntaxKind.
TypeConstraint
);
598
N(SyntaxKind.
TypeConstraint
);
701
N(SyntaxKind.
TypeConstraint
);
888
N(SyntaxKind.
TypeConstraint
);
991
N(SyntaxKind.
TypeConstraint
);
1099
N(SyntaxKind.
TypeConstraint
);
1202
N(SyntaxKind.
TypeConstraint
);
1608
N(SyntaxKind.
TypeConstraint
);
1711
N(SyntaxKind.
TypeConstraint
);
2309
N(SyntaxKind.
TypeConstraint
);
2412
N(SyntaxKind.
TypeConstraint
);
2533
N(SyntaxKind.
TypeConstraint
);
2636
N(SyntaxKind.
TypeConstraint
);
2766
N(SyntaxKind.
TypeConstraint
);
2869
N(SyntaxKind.
TypeConstraint
);
2977
N(SyntaxKind.
TypeConstraint
);
3089
N(SyntaxKind.
TypeConstraint
);
3294
N(SyntaxKind.
TypeConstraint
);
3406
N(SyntaxKind.
TypeConstraint
);
3633
N(SyntaxKind.
TypeConstraint
);
3745
N(SyntaxKind.
TypeConstraint
);
3937
N(SyntaxKind.
TypeConstraint
);
4049
N(SyntaxKind.
TypeConstraint
);
Parsing\MemberDeclarationParsingTests.cs (9)
9210
M(SyntaxKind.
TypeConstraint
);
9265
M(SyntaxKind.
TypeConstraint
);
9332
M(SyntaxKind.
TypeConstraint
);
9417
M(SyntaxKind.
TypeConstraint
);
9475
M(SyntaxKind.
TypeConstraint
);
9530
M(SyntaxKind.
TypeConstraint
);
9580
N(SyntaxKind.
TypeConstraint
);
9588
M(SyntaxKind.
TypeConstraint
);
9642
M(SyntaxKind.
TypeConstraint
);
Parsing\RecordParsing.cs (5)
806
N(SyntaxKind.
TypeConstraint
);
822
M(SyntaxKind.
TypeConstraint
);
876
N(SyntaxKind.
TypeConstraint
);
892
M(SyntaxKind.
TypeConstraint
);
986
M(SyntaxKind.
TypeConstraint
);
Parsing\ScriptParsingTests.cs (1)
3338
M(SyntaxKind.
TypeConstraint
);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
174
if ((name.IsUnmanaged || name.IsNotNull) && name.Parent.IsKind(SyntaxKind.
TypeConstraint
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
308
if (type.IsParentKind(SyntaxKind.
TypeConstraint
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
162
public int TypeConstraint => (int)SyntaxKind.
TypeConstraint
;