5 implementations of IsTupleType
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
52public bool IsTupleType => false;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
143bool ITypeSymbol.IsTupleType => UnderlyingTypeSymbol.IsTupleType;
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
61public bool IsTupleType => _symbol.IsTupleType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
569Private ReadOnly Property ITypeSymbol_IsTupleSymbol As Boolean Implements ITypeSymbol.IsTupleType
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
52public bool IsTupleType => false;
151 references to IsTupleType
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
50if (field.ContainingType.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
175=> symbol is ITypeSymbol { IsTupleType: true }; 259=> symbol is IFieldSymbol { ContainingType.IsTupleType: true };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
361if (type == null || type.IsAnonymousType() || type.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
409else if (namedTypeSymbol.IsTupleType && namedTypeSymbol.TupleUnderlyingType is INamedTypeSymbol underlyingType && underlyingType != namedTypeSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (2)
22Debug.Assert(symbol.IsTupleType); 57contextualSymbol = contextualSymbol is { IsTupleType: true } ? contextualSymbol : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
334if (x.IsTupleType != y.IsTupleType) 346if (x.IsTupleType) 420Debug.Assert(y.IsTupleType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
163if (x.IsTupleType)
Microsoft.CodeAnalysis.CSharp (7)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (6)
237if (this.IsMinimizing || (symbol.IsTupleType && !ShouldDisplayAsValueTuple(symbol))) 312Debug.Assert(symbol.IsTupleType); 329else if (symbol.IsTupleType && !ShouldDisplayAsValueTuple(symbol)) 500Debug.Assert(tupleSymbol.IsTupleType); 539Debug.Assert(symbol.IsTupleType); 689else if (symbol.IsTupleType && !ShouldDisplayAsValueTuple(symbol))
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
128if (!(symbol.IsAnonymousType || symbol.IsTupleType))
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
168if (type is not INamedTypeSymbol { IsTupleType: true, TupleElements.Length: >= 2 } tupleTypeOpt)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
39if (typeInDeclaration == null || !typeInDeclaration.IsTupleType)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
61if (targetType is not INamedTypeSymbol { IsTupleType: true, TupleElements: var tupleElements })
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
167Debug.Assert(typeSymbol.IsTupleType);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
183if (symbol.IsTupleType && symbol.TupleUnderlyingType != null && !symbol.Equals(symbol.TupleUnderlyingType)) 231if (symbol.IsTupleType && symbol.TupleElements.Length >= 2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (52)
CodeGen\CodeGenTupleEqualityTests.cs (1)
4282Assert.True(left.Type.IsTupleType);
CodeGen\CodeGenTupleTest.cs (51)
4476Assert.True(vt2.IsTupleType); 5818Assert.True(tupleWithoutNames.IsTupleType); 5858Assert.True(tupleWithoutNames.IsTupleType); 5876Assert.True(tupleWithoutNames.IsTupleType); 5915Assert.True(tuple.IsTupleType); 5953Assert.True(tupleWithoutNames.IsTupleType); 5974Assert.True(tupleWithNames.IsTupleType); 5993Assert.True(tupleWithSomeNames.IsTupleType); 6011Assert.True(tupleWithNames.IsTupleType); 6032Assert.True(tuple8WithoutNames.IsTupleType); 6059Assert.True(tuple8WithoutNames.IsTupleType); 6085Assert.True(tuple8WithNames.IsTupleType); 6110Assert.True(tuple9WithoutNames.IsTupleType); 6135Assert.True(tuple9WithNames.IsTupleType); 6167Assert.True(tuple9WithNames.IsTupleType); 6369Assert.True(tupleWithoutNames.IsTupleType); 6394Assert.True(tuple.IsTupleType); 6417Assert.True(tupleWithoutNames.IsTupleType); 6433Assert.True(tupleWithNames.IsTupleType); 6448Assert.True(tupleWithNames.IsTupleType); 6465Assert.True(tuple8WithoutNames.IsTupleType); 6485Assert.True(tuple8WithNames.IsTupleType); 6505Assert.True(tuple9WithoutNames.IsTupleType); 6526Assert.True(tuple9WithNames.IsTupleType); 13977Assert.True(((ITypeSymbol)nameofArgSymbolInfo.Symbol).IsTupleType); 13994Assert.True(typeInfo.Type.IsTupleType); 13999Assert.True(typeInfo.Type.IsTupleType); 14005Assert.False(typeInfo.Type.IsTupleType); 14232Assert.False(m1Tuple.IsTupleType); 14237Assert.False(m1Tuple.IsTupleType); 14248Assert.True(m1Tuple.IsTupleType); 14255Assert.True(m1Tuple.IsTupleType); 14264Assert.True(m2Tuple.IsTupleType); 14271Assert.False(f1Tuple.IsTupleType); 14278Assert.True(f1Tuple.IsTupleType); 14285Assert.False(p1Tuple.IsTupleType); 14292Assert.True(p1Tuple.IsTupleType); 14299Assert.False(m3TupleArray.ElementType.IsTupleType); 14309Assert.True(m3TupleArray.ElementType.IsTupleType); 14317Assert.False(m4TupleList.TypeArguments[0].IsTupleType); 14327Assert.True(m4TupleList.TypeArguments[0].IsTupleType); 14334Assert.True(m5Tuple.IsTupleType); 14344Assert.True(m6Tuple.IsTupleType); 14349Assert.True(m6Tuple.IsTupleType); 14426Assert.False(e1Tuple.IsTupleType); 14436Assert.True(e1Tuple.IsTupleType); 14443Assert.False(m5TuplePointer.PointedAtType.IsTupleType); 14450Assert.True(m5TuplePointer.PointedAtType.IsTupleType); 14460Assert.False(v1Tuple.IsTupleType); 16570Assert.True(xSymbol.IsTupleType); 16607Assert.True(xSymbol.IsTupleType);
Microsoft.CodeAnalysis.CSharp.Features (4)
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
137var tupleTypes = inferredTypes.Where(t => t.IsTupleType).OfType<INamedTypeSymbol>().ToList();
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
168if (type is not INamedTypeSymbol { IsTupleType: true, TupleElements.Length: >= 2 } tupleTypeOpt)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
61if (targetType is not INamedTypeSymbol { IsTupleType: true, TupleElements: var tupleElements })
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
167Debug.Assert(typeSymbol.IsTupleType);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\SemanticModelAPITests.cs (2)
4501Assert.True(type.IsTupleType); 4579Assert.True(type.IsTupleType);
SymbolDisplay\SymbolDisplayTests.cs (1)
5214Assert.True(((ITypeSymbol)firstPart.Symbol).IsTupleType);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Simplification\CSharpSimplificationService.Expander.cs (1)
475if (aliasTarget is INamedTypeSymbol typeSymbol && typeSymbol.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
39if (typeInDeclaration == null || !typeInDeclaration.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
183if (symbol.IsTupleType && symbol.TupleUnderlyingType != null && !symbol.Equals(symbol.TupleUnderlyingType)) 231if (symbol.IsTupleType && symbol.TupleElements.Length >= 2)
Microsoft.CodeAnalysis.EditorFeatures (1)
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
237((IFieldSymbol)sourceSymbol).ContainingType.IsTupleType &&
Microsoft.CodeAnalysis.Features (9)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
208if (tupleType?.IsTupleType != true)
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
52if (type.IsTupleType && syntaxFacts.SupportsTupleDeconstruction(expression.SyntaxTree.Options))
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
196var hasAtLeastOneTupleWhichAppearsMultipleTimes = transitiveReferences.Any(kvp => kvp.Key.IsTupleType && kvp.Value.count >= 2); 202if (namedType.IsTupleType && !hasAtLeastOneTupleWhichAppearsMultipleTimes)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
94else if (symbol.IsTupleType)
LanguageServices\AnonymousTypeDisplayService\StructuralTypeDisplayInfo.cs (1)
62if (type.IsTupleType && part.ToString() == "<tuple>")
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
329if (namedType.IsTupleType)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
61public bool IsTupleType => _symbol.IsTupleType;
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
50if (field.ContainingType.IsTupleType)
Microsoft.CodeAnalysis.VisualBasic (8)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (6)
108If Me.IsMinimizing OrElse (symbol.IsTupleType AndAlso Not ShouldDisplayAsValueTuple(symbol)) Then 212ElseIf symbol.IsTupleType Then 313Debug.Assert(symbol.IsTupleType) 355Debug.Assert(tupleSymbol.IsTupleType) 376Debug.Assert(symbol.IsTupleType) 434ElseIf symbol.IsTupleType Then
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
98If Not (symbol.IsAnonymousType OrElse symbol.IsTupleType) Then
Symbols\TypeSymbol.vb (1)
569Private ReadOnly Property ITypeSymbol_IsTupleSymbol As Boolean Implements ITypeSymbol.IsTupleType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
71If symbol.IsTupleType AndAlso 130If symbol.IsTupleType AndAlso symbol.TupleElements.Length >= 2 Then
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (20)
CodeGen\CodeGenTuples.vb (20)
6892Assert.True(tupleWithoutNames.IsTupleType) 6926Assert.True(tuple.IsTupleType) 6945Assert.True(tupleWithoutNames.IsTupleType) 6965Assert.True(tupleWithoutNames.IsTupleType) 6986Assert.True(tupleWithSomeNames.IsTupleType) 7005Assert.True(tupleWithoutNames.IsTupleType) 7027Assert.True(tuple8WithoutNames.IsTupleType) 7052Assert.True(tuple8WithNames.IsTupleType) 7077Assert.True(tuple9WithoutNames.IsTupleType) 7102Assert.True(tuple9WithNames.IsTupleType) 7127Assert.True(tuple9WithNames.IsTupleType) 7248Assert.True(tupleWithoutNames.IsTupleType) 7277Assert.True(tuple.IsTupleType) 7295Assert.True(tupleWithoutNames.IsTupleType) 7313Assert.True(tupleWithoutNames.IsTupleType) 7330Assert.True(tupleWithoutNames.IsTupleType) 7348Assert.True(tuple8WithoutNames.IsTupleType) 7369Assert.True(tuple8WithNames.IsTupleType) 7390Assert.True(tuple9WithoutNames.IsTupleType) 7411Assert.True(tuple9WithNames.IsTupleType)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
1484Assert.True(tupleWithoutNames.IsTupleType) 1500Assert.True(tupleWithNames.IsTupleType)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Source\FieldTests.vb (1)
66Assert.False(fieldType.IsTupleType)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (2)
71If symbol.IsTupleType AndAlso 130If symbol.IsTupleType AndAlso symbol.TupleElements.Length >= 2 Then
Microsoft.CodeAnalysis.Workspaces (14)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
529=> container is not INamedTypeSymbol { IsTupleType: true } namedType
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
175=> symbol is ITypeSymbol { IsTupleType: true }; 259=> symbol is IFieldSymbol { ContainingType.IsTupleType: true };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
361if (type == null || type.IsAnonymousType() || type.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
409else if (namedTypeSymbol.IsTupleType && namedTypeSymbol.TupleUnderlyingType is INamedTypeSymbol underlyingType && underlyingType != namedTypeSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (2)
22Debug.Assert(symbol.IsTupleType); 57contextualSymbol = contextualSymbol is { IsTupleType: true } ? contextualSymbol : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
334if (x.IsTupleType != y.IsTupleType) 346if (x.IsTupleType) 420Debug.Assert(y.IsTupleType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
163if (x.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
202if (namedType.OriginalDefinition.IsSpecialType() || namedType.IsNullable() || namedType.IsTupleType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
245if (valueIEquatable || memberType?.IsTupleType == true)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SymbolKeyTests.cs (2)
1038Assert.True(method.Parameters[0].Type.IsTupleType); 1075Assert.True(method.Parameters[0].Type.IsTupleType);
System.Text.Json.SourceGeneration (2)
Helpers\RoslynExtensions.cs (1)
61if (namedType.IsTupleType)
JsonSourceGenerator.Parser.cs (1)
673IsValueTuple = type.IsTupleType,