37 references to SpecialTypeConstraintKind
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
1810SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kinds, bool isUnmanagedType, IEnumerable<SyntaxNode>? types) 1829SpecialTypeConstraintKind kinds, 1837if ((kinds & SpecialTypeConstraintKind.Constructor) != 0) 1842var isReferenceType = (kinds & SpecialTypeConstraintKind.ReferenceType) != 0; 1843var isValueType = (kinds & SpecialTypeConstraintKind.ValueType) != 0 && !isUnmanagedType;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (8)
CodeGeneration\SyntaxGeneratorTests.cs (8)
2085"a", SpecialTypeConstraintKind.Constructor), 2091"a", SpecialTypeConstraintKind.ReferenceType), 2097"a", SpecialTypeConstraintKind.ValueType), 2103"a", SpecialTypeConstraintKind.ReferenceType | SpecialTypeConstraintKind.Constructor), 2109"a", SpecialTypeConstraintKind.ReferenceType | SpecialTypeConstraintKind.ValueType), 2115"a", SpecialTypeConstraintKind.ReferenceType, Generator.IdentifierName("b"), Generator.IdentifierName("c")),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
CodeGeneration\VisualBasicSyntaxGenerator.vb (4)
2651kinds As SpecialTypeConstraintKind, 2660If (kinds And SpecialTypeConstraintKind.Constructor) <> 0 Then 2664Dim isReferenceType = (kinds And SpecialTypeConstraintKind.ReferenceType) <> 0 2665Dim isValueType = (kinds And SpecialTypeConstraintKind.ValueType) <> 0
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (8)
CodeGeneration\SyntaxGeneratorTests.vb (8)
2024"a", SpecialTypeConstraintKind.Constructor), 2031"a", SpecialTypeConstraintKind.ReferenceType), 2038"a", SpecialTypeConstraintKind.ValueType), 2045"a", SpecialTypeConstraintKind.ReferenceType Or SpecialTypeConstraintKind.Constructor), 2052"a", SpecialTypeConstraintKind.ValueType Or SpecialTypeConstraintKind.Constructor), 2059"a", SpecialTypeConstraintKind.ReferenceType, Generator.IdentifierName("b"), Generator.IdentifierName("c")),
Microsoft.CodeAnalysis.Workspaces (12)
Editing\SyntaxEditorExtensions.cs (1)
37public static void SetTypeConstraint(this SyntaxEditor editor, SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kind, IEnumerable<SyntaxNode> types)
Editing\SyntaxGenerator.cs (11)
221decl = WithTypeConstraint(decl, typeParameter.Name, SpecialTypeConstraintKind.ReferenceType); 871kinds: (tp.HasConstructorConstraint ? SpecialTypeConstraintKind.Constructor : SpecialTypeConstraintKind.None) 872| (tp.HasReferenceTypeConstraint ? SpecialTypeConstraintKind.ReferenceType : SpecialTypeConstraintKind.None) 873| (tp.HasValueTypeConstraint ? SpecialTypeConstraintKind.ValueType : SpecialTypeConstraintKind.None), 907public SyntaxNode WithTypeConstraint(SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kinds, IEnumerable<SyntaxNode>? types = null) 912SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kinds, bool isUnamangedType, IEnumerable<SyntaxNode>? types); 919public SyntaxNode WithTypeConstraint(SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kinds, params SyntaxNode[] types) 926=> WithTypeConstraint(declaration, typeParameterName, SpecialTypeConstraintKind.None, (IEnumerable<SyntaxNode>)types);