2 implementations of HasReferenceTypeConstraint
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeParameterSymbol.cs (1)
87bool ITypeParameterSymbol.HasReferenceTypeConstraint => _underlying.HasReferenceTypeConstraint;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeParameterSymbol.vb (1)
316Public MustOverride ReadOnly Property HasReferenceTypeConstraint As Boolean Implements ITypeParameterSymbol.HasReferenceTypeConstraint
41 references to HasReferenceTypeConstraint
ILLink.RoslynAnalyzer (1)
RequiresDynamicCodeAnalyzer.cs (1)
121 if (!param.TypeParameterSymbol.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis (1)
Symbols\ITypeParameterSymbol.cs (1)
51/// If <see cref="HasReferenceTypeConstraint"/> is true, returns the top-level nullability of the
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
225typeParameter1.HasReferenceTypeConstraint != typeParameter2.HasReferenceTypeConstraint ||
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.AbstractInvocationInfo.cs (1)
77hasReferenceConstraint: typeParameter.HasReferenceTypeConstraint,
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
272var condition3 = typeParameter.HasReferenceTypeConstraint && typeParameter.ConstraintTypes.Any(static ts => ts.IsReferenceType && ts.SpecialType != SpecialType.System_Object);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
123typeParameter.HasReferenceTypeConstraint,
Microsoft.CodeAnalysis.CSharp (2)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
839typeParam.HasReferenceTypeConstraint || typeParam.HasValueTypeConstraint || 868if (typeParam.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
260instance is { Type: ITypeParameterSymbol { HasReferenceTypeConstraint: false } };
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
82!typeParameter.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
235{ HasReferenceTypeConstraint: true } => s_classConstraint,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
42if (typeParameter.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis.CSharp.Features (4)
SignatureHelp\GenericNameSignatureHelpProvider.cs (2)
247if (typeParam.HasReferenceTypeConstraint) 312typeParam.HasReferenceTypeConstraint || typeParam.HasValueTypeConstraint ||
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
260instance is { Type: ITypeParameterSymbol { HasReferenceTypeConstraint: false } };
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
82!typeParameter.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
176if (typeParameter.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
235{ HasReferenceTypeConstraint: true } => s_classConstraint,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
42if (typeParameter.HasReferenceTypeConstraint)
Microsoft.CodeAnalysis.Features (4)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2410oldParameter.HasReferenceTypeConstraint == newParameter.HasReferenceTypeConstraint &&
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.AbstractInvocationInfo.cs (1)
77hasReferenceConstraint: typeParameter.HasReferenceTypeConstraint,
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
272var condition3 = typeParameter.HasReferenceTypeConstraint && typeParameter.ConstraintTypes.Any(static ts => ts.IsReferenceType && ts.SpecialType != SpecialType.System_Object);
Microsoft.CodeAnalysis.VisualBasic (3)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (2)
523Return If(typeParam.HasReferenceTypeConstraint, 1, 0) + 549If typeParam.HasReferenceTypeConstraint Then
Symbols\TypeParameterSymbol.vb (1)
316Public MustOverride ReadOnly Property HasReferenceTypeConstraint As Boolean Implements ITypeParameterSymbol.HasReferenceTypeConstraint
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\TypeParameterGenerator.vb (1)
25If symbol.HasReferenceTypeConstraint Then
Microsoft.CodeAnalysis.VisualBasic.Features (2)
SignatureHelp\GenericNameSignatureHelpProvider.vb (2)
178If typeParam.HasReferenceTypeConstraint Then 214Return If(typeParam.HasReferenceTypeConstraint, 1, 0) +
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\TypeParameterGenerator.vb (1)
25If symbol.HasReferenceTypeConstraint Then
Microsoft.CodeAnalysis.Workspaces (5)
Editing\SyntaxGenerator.cs (2)
873| (tp.HasReferenceTypeConstraint ? SpecialTypeConstraintKind.ReferenceType : SpecialTypeConstraintKind.None) 885=> typeParameter.HasConstructorConstraint || typeParameter.HasReferenceTypeConstraint || typeParameter.HasValueTypeConstraint || typeParameter.ConstraintTypes.Length > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
225typeParameter1.HasReferenceTypeConstraint != typeParameter2.HasReferenceTypeConstraint ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
123typeParameter.HasReferenceTypeConstraint,
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ObjectBrowser\DescriptionBuilder.cs (2)
344!typeParameterSymbol.HasReferenceTypeConstraint && 359if (typeParameterSymbol.HasReferenceTypeConstraint)
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
ObjectBrowser\DescriptionBuilder.vb (3)
449If typeParameter.HasReferenceTypeConstraint Then 466If typeParameter.HasReferenceTypeConstraint Then 506If typeParameter.HasReferenceTypeConstraint Then