37 references to SpecialTypeConstraintKind
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
1820SyntaxNode declaration, string typeParameterName, SpecialTypeConstraintKind kinds, bool isUnmanagedType, IEnumerable<SyntaxNode>? types) 1839SpecialTypeConstraintKind kinds, 1847if ((kinds & SpecialTypeConstraintKind.Constructor) != 0) 1852var isReferenceType = (kinds & SpecialTypeConstraintKind.ReferenceType) != 0; 1853var isValueType = (kinds & SpecialTypeConstraintKind.ValueType) != 0 && !isUnmanagedType;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (8)
CodeGeneration\SyntaxGeneratorTests.cs (8)
2192"a", SpecialTypeConstraintKind.Constructor), 2198"a", SpecialTypeConstraintKind.ReferenceType), 2204"a", SpecialTypeConstraintKind.ValueType), 2210"a", SpecialTypeConstraintKind.ReferenceType | SpecialTypeConstraintKind.Constructor), 2216"a", SpecialTypeConstraintKind.ReferenceType | SpecialTypeConstraintKind.ValueType), 2222"a", SpecialTypeConstraintKind.ReferenceType, Generator.IdentifierName("b"), Generator.IdentifierName("c")),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
CodeGeneration\VisualBasicSyntaxGenerator.vb (4)
2608kinds As SpecialTypeConstraintKind, 2617If (kinds And SpecialTypeConstraintKind.Constructor) <> 0 Then 2621Dim isReferenceType = (kinds And SpecialTypeConstraintKind.ReferenceType) <> 0 2622Dim 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);