3 instantiations of TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Tuples\TupleTypeSymbol.vb (3)
341
Me.
New
(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)),
430
Return New
TupleTypeSymbol
(locations, tupleCompatibleType, elementLocations, elementNames, elementTypes, errorPositions)
502
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)
1527
Name =
TupleTypeSymbol
.TupleTypeName AndAlso
1532
If arity > 0 AndAlso arity <
TupleTypeSymbol
.RestPosition Then
1535
ElseIf arity =
TupleTypeSymbol
.RestPosition AndAlso Not IsDefinition Then
1542
typeToCheck = DirectCast(typeToCheck, NamedTypeSymbol).TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1)
1547
If underlying.Arity =
TupleTypeSymbol
.RestPosition AndAlso Not TypeSymbol.Equals(underlying.OriginalDefinition, Me.OriginalDefinition, TypeCompareKind.ConsiderEverything) Then
1552
tupleCardinality = (
TupleTypeSymbol
.RestPosition - 1) * levelsOfNesting + typeToCheck.TupleElementTypes.Length
1559
arity <
TupleTypeSymbol
.RestPosition AndAlso
1561
Debug.Assert(tupleCardinality <
TupleTypeSymbol
.RestPosition)
1562
tupleCardinality += (
TupleTypeSymbol
.RestPosition - 1) * levelsOfNesting
Symbols\Retargeting\RetargetingSymbolTranslator.vb (1)
155
Return DirectCast(type,
TupleTypeSymbol
).WithUnderlyingType(newUnderlyingType)
Symbols\SubstitutedErrorType.vb (1)
263
Dim otherTuple = TryCast(obj,
TupleTypeSymbol
)
Symbols\SubstitutedNamedType.vb (1)
535
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
108
Public Sub New(container As
TupleTypeSymbol
, underlyingProperty As PropertySymbol)
Symbols\Tuples\TupleTypeSymbol.vb (59)
373
Optional diagnostics As BindingDiagnosticBag = Nothing) As
TupleTypeSymbol
382
Dim tupleUnderlyingType As NamedTypeSymbol =
TupleTypeSymbol
.GetTupleUnderlyingType(elementTypes, syntax, compilation, diagnostics)
388
Dim constructedType =
TupleTypeSymbol
.Create(locationOpt, tupleUnderlyingType, elementLocations, elementNames, errorPositions)
396
Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol) As
TupleTypeSymbol
397
Return
TupleTypeSymbol
.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, Nothing, Nothing)
400
Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol, elementNames As ImmutableArray(Of String)) As
TupleTypeSymbol
401
Return
TupleTypeSymbol
.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, elementNames, errorPositions:=Nothing)
406
errorPositions As ImmutableArray(Of Boolean)) As
TupleTypeSymbol
408
Return
TupleTypeSymbol
.Create(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)),
414
errorPositions As ImmutableArray(Of Boolean)) As
TupleTypeSymbol
419
If tupleCompatibleType.Arity =
TupleTypeSymbol
.RestPosition Then
420
tupleCompatibleType =
TupleTypeSymbol
.EnsureRestExtensionsAreTuples(tupleCompatibleType)
421
Dim tupleElementTypes As ImmutableArray(Of TypeSymbol) = tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleElementTypes
422
Dim instance As ArrayBuilder(Of TypeSymbol) = ArrayBuilder(Of TypeSymbol).GetInstance(
TupleTypeSymbol
.RestPosition - 1 + tupleElementTypes.Length)
423
instance.AddRange(tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics,
TupleTypeSymbol
.RestPosition - 1)
434
If Not tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).IsTupleType Then
440
namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1), NamedTypeSymbol)
441
Loop While namedTypeSymbol.Arity =
TupleTypeSymbol
.RestPosition
450
Dim typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers) = ArrayBuilder(Of TypeWithModifiers).GetInstance(
TupleTypeSymbol
.RestPosition)
452
Dim extensionTuple As
TupleTypeSymbol
=
TupleTypeSymbol
.Create(CType(Nothing, Location), tupleCompatibleType, Nothing, Nothing, Nothing)
454
tupleCompatibleType =
TupleTypeSymbol
.ReplaceRestExtensionType(tupleCompatibleType, typeArgumentsBuilder, extensionTuple)
463
Private Shared Function ReplaceRestExtensionType(tupleCompatibleType As NamedTypeSymbol, typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers), extensionTuple As
TupleTypeSymbol
) As NamedTypeSymbol
469
For i As Integer = 0 To
TupleTypeSymbol
.RestPosition - 1 - 1
475
If(hasTypeArgumentsCustomModifiers, tupleCompatibleType.GetTypeArgumentCustomModifiers(
TupleTypeSymbol
.RestPosition - 1), Nothing)))
482
Friend Function WithUnderlyingType(newUnderlyingType As NamedTypeSymbol) As
TupleTypeSymbol
484
Return
TupleTypeSymbol
.Create(Me._locations, newUnderlyingType, Me._elementLocations, Me._providedElementNames, Me._errorPositions)
487
Friend Function WithElementNames(newElementNames As ImmutableArray(Of String)) As
TupleTypeSymbol
510
If namedTypeSymbol.Arity <>
TupleTypeSymbol
.RestPosition Then
513
namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleUnderlyingType
525
Dim length As Integer = Math.Min(namedTypeSymbol.Arity,
TupleTypeSymbol
.RestPosition - 1)
527
If namedTypeSymbol.Arity <>
TupleTypeSymbol
.RestPosition Then
530
namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1), NamedTypeSymbol)
538
namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleUnderlyingType
551
Dim chainLength As Integer =
TupleTypeSymbol
.NumberOfValueTuples(numElements, remainder)
553
Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(remainder))
559
Dim namedTypeSymbol As NamedTypeSymbol = wellKnownType.Construct(ImmutableArray.Create(Of TypeSymbol)(elementTypes, (chainLength - 1) * (
TupleTypeSymbol
.RestPosition - 1), remainder))
562
Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(
TupleTypeSymbol
.RestPosition))
568
Dim typeArguments As ImmutableArray(Of TypeSymbol) = ImmutableArray.Create(Of TypeSymbol)(elementTypes, ([loop] - 1) * (
TupleTypeSymbol
.RestPosition - 1),
TupleTypeSymbol
.RestPosition - 1).Add(namedTypeSymbol)
579
Dim num As Integer =
TupleTypeSymbol
.NumberOfValueTuples(cardinality, arity)
580
Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(arity))
584
Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(
TupleTypeSymbol
.RestPosition))
590
If arity >
TupleTypeSymbol
.RestPosition Then
594
Return
TupleTypeSymbol
.tupleTypes(arity - 1)
598
If arity >
TupleTypeSymbol
.RestPosition Then
602
Return
TupleTypeSymbol
.tupleCtors(arity - 1)
606
Return
TupleTypeSymbol
.tupleMembers(arity - 1)(position - 1)
623
If
TupleTypeSymbol
.IsElementNameForbidden(name) Then
631
If num > 0 AndAlso IdentifierComparison.Equals(name,
TupleTypeSymbol
.TupleMemberName(num)) Then
650
Dim wellKnownMemberInType As Symbol =
TupleTypeSymbol
.GetWellKnownMemberInType(type, relativeMember)
880
Dim num As Integer = Math.Min(underlying.Arity,
TupleTypeSymbol
.RestPosition - 1)
882
Dim tupleTypeMember As WellKnownMember =
TupleTypeSymbol
.GetTupleTypeMember(underlying.Arity, i + 1)
883
fieldsForElements.Add(CType(
TupleTypeSymbol
.GetWellKnownMemberInType(underlying, tupleTypeMember), FieldSymbol))
984
Dim otherTuple = TryCast(obj,
TupleTypeSymbol
)
1065
result =
TupleTypeSymbol
.Create(CType(target, NamedTypeSymbol))
1078
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)