37 references to SpecialTypeConstraintKind
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
1821SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kinds, bool isUnmanagedType, IEnumerable<SyntaxNode>? types) 1840SpecialTypeConstraintKind kinds, 1848if ((kinds & SpecialTypeConstraintKind.Constructor) != 0) 1853var isReferenceType = (kinds & SpecialTypeConstraintKind.ReferenceType) != 0; 1854var isValueType = (kinds & SpecialTypeConstraintKind.ValueType) != 0 && !isUnmanagedType;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (8)
CodeGeneration\SyntaxGeneratorTests.cs (8)
2167"a", SpecialTypeConstraintKind.Constructor), 2173"a", SpecialTypeConstraintKind.ReferenceType), 2179"a", SpecialTypeConstraintKind.ValueType), 2185"a", SpecialTypeConstraintKind.ReferenceType | SpecialTypeConstraintKind.Constructor), 2191"a", SpecialTypeConstraintKind.ReferenceType | SpecialTypeConstraintKind.ValueType), 2197"a", SpecialTypeConstraintKind.ReferenceType, Generator.IdentifierName("b"), Generator.IdentifierName("c")),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
CodeGeneration\VisualBasicSyntaxGenerator.vb (4)
2606kinds As SpecialTypeConstraintKind, 2615If (kinds And SpecialTypeConstraintKind.Constructor) <> 0 Then 2619Dim isReferenceType = (kinds And SpecialTypeConstraintKind.ReferenceType) <> 0 2620Dim 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)
35public 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);