7 implementations of IsRefLikeType
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
122public bool IsRefLikeType => Modifiers.IsRef;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
80bool ITypeSymbol.IsRefLikeType => throw new System.NotImplementedException();
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
171bool ITypeSymbol.IsRefLikeType => UnderlyingTypeSymbol.IsRefLikeType;
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
137public bool IsRefLikeType => _symbol.IsRefLikeType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
587Private ReadOnly Property ITypeSymbol_IsRefLikeType As Boolean Implements ITypeSymbol.IsRefLikeType
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
122public bool IsRefLikeType => Modifiers.IsRef;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
80bool ITypeSymbol.IsRefLikeType => throw new System.NotImplementedException();
70 references to IsRefLikeType
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
70type.IsRefLikeType ||
Microsoft.CodeAnalysis (1)
Symbols\ISymbolExtensions.cs (1)
152if (scopeType is not INamedTypeSymbol { Name: WellKnownMemberNames.LockScopeTypeName, Arity: 0, IsValueType: true, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public } ||
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
85!instance.Type.IsRefLikeType)
src\Workspaces\Core\Portable\Editing\DeclarationModifiers.cs (1)
88isRef: field?.RefKind is RefKind.Ref or RefKind.RefReadOnly || type?.IsRefLikeType == true,
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
122if (containingType.IsRefLikeType)
Microsoft.CodeAnalysis.CSharp (3)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
832!(symbol.IsParams && symbol.Type is { IsRefLikeType: true } or ITypeParameterSymbol { AllowsRefLikeType: true }))
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
705Debug.Assert(!symbol.IsRefLikeType); 747if (symbol.IsRefLikeType)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (4)
438if (method.ReturnType.IsRefLikeType) 512if (!local.Type.IsRefLikeType) 560if (method.ReturnType.IsRefLikeType) 582if (siblingParameter.Type.IsRefLikeType &&
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
369if (constructor.Parameters.Any(p => p.Type.IsRefLikeType))
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
110if (local.Type.IsRefLikeType || local.Type.RequiresUnsafeModifier())
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
52if (!structDeclarationSymbol.IsRefLikeType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
304if (namedType.IsRefLikeType)
Microsoft.CodeAnalysis.CSharp.Features (6)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
438if (method.ReturnType.IsRefLikeType) 512if (!local.Type.IsRefLikeType) 560if (method.ReturnType.IsRefLikeType)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
369if (constructor.Parameters.Any(p => p.Type.IsRefLikeType))
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
110if (local.Type.IsRefLikeType || local.Type.RequiresUnsafeModifier())
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
52if (!structDeclarationSymbol.IsRefLikeType)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\RefEscapingTests.cs (14)
52Assert.True(getLocalType("span").IsRefLikeType); 53Assert.False(getLocalType("s1").IsRefLikeType); 54Assert.True(getLocalType("s2").IsRefLikeType); 55Assert.False(getLocalType("i0").IsRefLikeType); 56Assert.False(getLocalType("t1").IsRefLikeType); 57Assert.False(getLocalType("e1").IsRefLikeType); 58Assert.False(getLocalType("o1").IsRefLikeType); 59Assert.False(getLocalType("c1").IsRefLikeType); 60Assert.False(getLocalType("t1").IsRefLikeType); 61Assert.False(getLocalType("u1").IsRefLikeType); 62Assert.False(getLocalType("p1").IsRefLikeType); 63Assert.False(getLocalType("a1").IsRefLikeType); 64Assert.False(getLocalType("a2").IsRefLikeType); 65Assert.False(getLocalType("t2").IsRefLikeType);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Parsing\ReadOnlyStructs.cs (13)
45Assert.False(s1.IsRefLikeType); 51Assert.False(s2.IsRefLikeType); 57Assert.False(s3.IsRefLikeType); 119Assert.False(s1.IsRefLikeType); 125Assert.False(s2.IsRefLikeType); 131Assert.False(s3.IsRefLikeType); 154Assert.True(s1.IsRefLikeType); 160Assert.True(s2.IsRefLikeType); 187Assert.False(s1.IsRefLikeType); 191Assert.True(s2.IsRefLikeType); 221Assert.True(s1.IsRefLikeType); 225Assert.False(s2.IsRefLikeType); 229Assert.True(s3.IsRefLikeType);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
823containerType is { IsRefLikeType: true } &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
304if (namedType.IsRefLikeType)
Microsoft.CodeAnalysis.Features (3)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
139if (!containingType.IsRefLikeType)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
137public bool IsRefLikeType => _symbol.IsRefLikeType;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
85!instance.Type.IsRefLikeType)
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
587Private ReadOnly Property ITypeSymbol_IsRefLikeType As Boolean Implements ITypeSymbol.IsRefLikeType
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Compilation\SemanticModelAPITests.vb (4)
2992Assert.False(getLocalType("s1").IsRefLikeType) 2993Assert.False(getLocalType("s2").IsRefLikeType) 2994Assert.False(getLocalType("s3").IsRefLikeType) 2995Assert.False(getLocalType("e1").IsRefLikeType)
Microsoft.CodeAnalysis.Workspaces (3)
Editing\DeclarationModifiers.cs (1)
88isRef: field?.RefKind is RefKind.Ref or RefKind.RefReadOnly || type?.IsRefLikeType == true,
Editing\SyntaxGenerator.cs (1)
332or { RefKind: RefKind.None, Type.IsRefLikeType: true, ScopedKind: ScopedKind.ScopedValue });
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
122if (containingType.IsRefLikeType)
Microsoft.Gen.ContextualOptions (2)
Parser.cs (2)
40if (type.Symbol.IsRefLikeType) 81.Where(prop => !prop.Type.IsRefLikeType)
Microsoft.Interop.SourceGeneration (1)
ManagedTypeInfo.cs (1)
74return new ValueTypeInfo(typeName, diagnosticFormattedName, type.IsRefLikeType);
System.Text.Json.SourceGeneration (5)
JsonSourceGenerator.Parser.cs (5)
531if (type is { IsRefLikeType: true } or INamedTypeSymbol { IsUnboundGenericType: true } or IErrorTypeSymbol) 583else if (valueType.IsRefLikeType || keyType?.IsRefLikeType is true) 1180if (memberType.IsRefLikeType) 1470if (parameterInfo.Type.IsRefLikeType)