3 instantiations of TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Tuples\TupleTypeSymbol.vb (3)
336
Me.
New
(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)),
425
Return New
TupleTypeSymbol
(locations, tupleCompatibleType, elementLocations, elementNames, elementTypes, errorPositions)
497
Return New
TupleTypeSymbol
(CType(Nothing, Location), Me._underlyingType, Nothing, newElementNames, Me._elementTypes, Nothing)
93 references to TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (93)
Symbols\ConstraintsHelper.vb (4)
447
tuple As
TupleTypeSymbol
,
463
TupleTypeSymbol
.GetUnderlyingTypeChain(type, underlyingTupleTypeChain)
481
Dim location = If(ordinal =
TupleTypeSymbol
.RestIndex, syntaxNode.Location, elementLocations(ordinal + offset))
487
offset +=
TupleTypeSymbol
.RestIndex
Symbols\InstanceErrorTypeSymbol.vb (1)
157
Dim otherTuple = TryCast(other,
TupleTypeSymbol
)
Symbols\InstanceTypeSymbol.vb (1)
144
Dim otherTuple = TryCast(other,
TupleTypeSymbol
)
Symbols\Metadata\PE\TupleTypeDecoder.vb (2)
24
''' a <see cref="
TupleTypeSymbol
"/> with attached names.
217
decodedType =
TupleTypeSymbol
.Create(decodedType, elementNames)
Symbols\NamedTypeSymbol.vb (9)
1525
Name =
TupleTypeSymbol
.TupleTypeName AndAlso
1530
If arity > 0 AndAlso arity <
TupleTypeSymbol
.RestPosition Then
1533
ElseIf arity =
TupleTypeSymbol
.RestPosition AndAlso Not IsDefinition Then
1540
typeToCheck = DirectCast(typeToCheck, NamedTypeSymbol).TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1)
1545
If underlying.Arity =
TupleTypeSymbol
.RestPosition AndAlso Not TypeSymbol.Equals(underlying.OriginalDefinition, Me.OriginalDefinition, TypeCompareKind.ConsiderEverything) Then
1550
tupleCardinality = (
TupleTypeSymbol
.RestPosition - 1) * levelsOfNesting + typeToCheck.TupleElementTypes.Length
1557
arity <
TupleTypeSymbol
.RestPosition AndAlso
1559
Debug.Assert(tupleCardinality <
TupleTypeSymbol
.RestPosition)
1560
tupleCardinality += (
TupleTypeSymbol
.RestPosition - 1) * levelsOfNesting
Symbols\Retargeting\RetargetingSymbolTranslator.vb (1)
158
Return DirectCast(type,
TupleTypeSymbol
).WithUnderlyingType(newUnderlyingType)
Symbols\SubstitutedErrorType.vb (1)
263
Dim otherTuple = TryCast(obj,
TupleTypeSymbol
)
Symbols\SubstitutedNamedType.vb (1)
529
Dim otherTuple = TryCast(other,
TupleTypeSymbol
)
Symbols\Tuples\TupleEventSymbol.vb (2)
18
Private ReadOnly _containingType As
TupleTypeSymbol
80
Public Sub New(container As
TupleTypeSymbol
, underlyingEvent As EventSymbol)
Symbols\Tuples\TupleFieldSymbol.vb (4)
18
Protected ReadOnly _containingTuple As
TupleTypeSymbol
86
Public Sub New(container As
TupleTypeSymbol
, underlyingField As FieldSymbol, tupleElementIndex As Integer)
142
Public Sub New(container As
TupleTypeSymbol
,
223
Public Sub New(container As
TupleTypeSymbol
,
Symbols\Tuples\TupleMethodSymbol.vb (2)
18
Private ReadOnly _containingType As
TupleTypeSymbol
107
Public Sub New(container As
TupleTypeSymbol
, underlyingMethod As MethodSymbol)
Symbols\Tuples\TuplePropertySymbol.vb (2)
18
Private ReadOnly _containingType As
TupleTypeSymbol
104
Public Sub New(container As
TupleTypeSymbol
, underlyingProperty As PropertySymbol)
Symbols\Tuples\TupleTypeSymbol.vb (59)
368
Optional diagnostics As BindingDiagnosticBag = Nothing) As
TupleTypeSymbol
377
Dim tupleUnderlyingType As NamedTypeSymbol =
TupleTypeSymbol
.GetTupleUnderlyingType(elementTypes, syntax, compilation, diagnostics)
383
Dim constructedType =
TupleTypeSymbol
.Create(locationOpt, tupleUnderlyingType, elementLocations, elementNames, errorPositions)
391
Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol) As
TupleTypeSymbol
392
Return
TupleTypeSymbol
.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, Nothing, Nothing)
395
Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol, elementNames As ImmutableArray(Of String)) As
TupleTypeSymbol
396
Return
TupleTypeSymbol
.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, elementNames, errorPositions:=Nothing)
401
errorPositions As ImmutableArray(Of Boolean)) As
TupleTypeSymbol
403
Return
TupleTypeSymbol
.Create(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)),
409
errorPositions As ImmutableArray(Of Boolean)) As
TupleTypeSymbol
414
If tupleCompatibleType.Arity =
TupleTypeSymbol
.RestPosition Then
415
tupleCompatibleType =
TupleTypeSymbol
.EnsureRestExtensionsAreTuples(tupleCompatibleType)
416
Dim tupleElementTypes As ImmutableArray(Of TypeSymbol) = tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleElementTypes
417
Dim instance As ArrayBuilder(Of TypeSymbol) = ArrayBuilder(Of TypeSymbol).GetInstance(
TupleTypeSymbol
.RestPosition - 1 + tupleElementTypes.Length)
418
instance.AddRange(tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics,
TupleTypeSymbol
.RestPosition - 1)
429
If Not tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).IsTupleType Then
435
namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1), NamedTypeSymbol)
436
Loop While namedTypeSymbol.Arity =
TupleTypeSymbol
.RestPosition
445
Dim typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers) = ArrayBuilder(Of TypeWithModifiers).GetInstance(
TupleTypeSymbol
.RestPosition)
447
Dim extensionTuple As
TupleTypeSymbol
=
TupleTypeSymbol
.Create(CType(Nothing, Location), tupleCompatibleType, Nothing, Nothing, Nothing)
449
tupleCompatibleType =
TupleTypeSymbol
.ReplaceRestExtensionType(tupleCompatibleType, typeArgumentsBuilder, extensionTuple)
458
Private Shared Function ReplaceRestExtensionType(tupleCompatibleType As NamedTypeSymbol, typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers), extensionTuple As
TupleTypeSymbol
) As NamedTypeSymbol
464
For i As Integer = 0 To
TupleTypeSymbol
.RestPosition - 1 - 1
470
If(hasTypeArgumentsCustomModifiers, tupleCompatibleType.GetTypeArgumentCustomModifiers(
TupleTypeSymbol
.RestPosition - 1), Nothing)))
477
Friend Function WithUnderlyingType(newUnderlyingType As NamedTypeSymbol) As
TupleTypeSymbol
479
Return
TupleTypeSymbol
.Create(Me._locations, newUnderlyingType, Me._elementLocations, Me._providedElementNames, Me._errorPositions)
482
Friend Function WithElementNames(newElementNames As ImmutableArray(Of String)) As
TupleTypeSymbol
505
If namedTypeSymbol.Arity <>
TupleTypeSymbol
.RestPosition Then
508
namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleUnderlyingType
520
Dim length As Integer = Math.Min(namedTypeSymbol.Arity,
TupleTypeSymbol
.RestPosition - 1)
522
If namedTypeSymbol.Arity <>
TupleTypeSymbol
.RestPosition Then
525
namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1), NamedTypeSymbol)
533
namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleUnderlyingType
546
Dim chainLength As Integer =
TupleTypeSymbol
.NumberOfValueTuples(numElements, remainder)
548
Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(remainder))
554
Dim namedTypeSymbol As NamedTypeSymbol = wellKnownType.Construct(ImmutableArray.Create(Of TypeSymbol)(elementTypes, (chainLength - 1) * (
TupleTypeSymbol
.RestPosition - 1), remainder))
557
Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(
TupleTypeSymbol
.RestPosition))
563
Dim typeArguments As ImmutableArray(Of TypeSymbol) = ImmutableArray.Create(Of TypeSymbol)(elementTypes, ([loop] - 1) * (
TupleTypeSymbol
.RestPosition - 1),
TupleTypeSymbol
.RestPosition - 1).Add(namedTypeSymbol)
574
Dim num As Integer =
TupleTypeSymbol
.NumberOfValueTuples(cardinality, arity)
575
Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(arity))
579
Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(
TupleTypeSymbol
.RestPosition))
585
If arity >
TupleTypeSymbol
.RestPosition Then
589
Return
TupleTypeSymbol
.tupleTypes(arity - 1)
593
If arity >
TupleTypeSymbol
.RestPosition Then
597
Return
TupleTypeSymbol
.tupleCtors(arity - 1)
601
Return
TupleTypeSymbol
.tupleMembers(arity - 1)(position - 1)
618
If
TupleTypeSymbol
.IsElementNameForbidden(name) Then
626
If num > 0 AndAlso IdentifierComparison.Equals(name,
TupleTypeSymbol
.TupleMemberName(num)) Then
645
Dim wellKnownMemberInType As Symbol =
TupleTypeSymbol
.GetWellKnownMemberInType(type, relativeMember)
875
Dim num As Integer = Math.Min(underlying.Arity,
TupleTypeSymbol
.RestPosition - 1)
877
Dim tupleTypeMember As WellKnownMember =
TupleTypeSymbol
.GetTupleTypeMember(underlying.Arity, i + 1)
878
fieldsForElements.Add(CType(
TupleTypeSymbol
.GetWellKnownMemberInType(underlying, tupleTypeMember), FieldSymbol))
979
Dim otherTuple = TryCast(obj,
TupleTypeSymbol
)
1060
result =
TupleTypeSymbol
.Create(CType(target, NamedTypeSymbol))
1073
Dim tupleType =
TupleTypeSymbol
.Create(Me._locations, substitutedUnderlying, Me._elementLocations,
Symbols\TypeSymbolExtensions.vb (4)
67
elementTypes = DirectCast(type,
TupleTypeSymbol
).TupleElementTypes
86
TupleTypeSymbol
.AddElementTypes(DirectCast(type, NamedTypeSymbol), elementTypesBuilder)
97
Return DirectCast(Type,
TupleTypeSymbol
).TupleElementTypes
110
TupleTypeSymbol
.AddElementTypes(DirectCast(Type, NamedTypeSymbol), elementTypesBuilder)