3 instantiations of TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Tuples\TupleTypeSymbol.vb (3)
342
Me.
New
(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)),
431
Return New
TupleTypeSymbol
(locations, tupleCompatibleType, elementLocations, elementNames, elementTypes, errorPositions)
503
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)
158
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)
374
Optional diagnostics As BindingDiagnosticBag = Nothing) As
TupleTypeSymbol
383
Dim tupleUnderlyingType As NamedTypeSymbol =
TupleTypeSymbol
.GetTupleUnderlyingType(elementTypes, syntax, compilation, diagnostics)
389
Dim constructedType =
TupleTypeSymbol
.Create(locationOpt, tupleUnderlyingType, elementLocations, elementNames, errorPositions)
397
Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol) As
TupleTypeSymbol
398
Return
TupleTypeSymbol
.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, Nothing, Nothing)
401
Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol, elementNames As ImmutableArray(Of String)) As
TupleTypeSymbol
402
Return
TupleTypeSymbol
.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, elementNames, errorPositions:=Nothing)
407
errorPositions As ImmutableArray(Of Boolean)) As
TupleTypeSymbol
409
Return
TupleTypeSymbol
.Create(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)),
415
errorPositions As ImmutableArray(Of Boolean)) As
TupleTypeSymbol
420
If tupleCompatibleType.Arity =
TupleTypeSymbol
.RestPosition Then
421
tupleCompatibleType =
TupleTypeSymbol
.EnsureRestExtensionsAreTuples(tupleCompatibleType)
422
Dim tupleElementTypes As ImmutableArray(Of TypeSymbol) = tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleElementTypes
423
Dim instance As ArrayBuilder(Of TypeSymbol) = ArrayBuilder(Of TypeSymbol).GetInstance(
TupleTypeSymbol
.RestPosition - 1 + tupleElementTypes.Length)
424
instance.AddRange(tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics,
TupleTypeSymbol
.RestPosition - 1)
435
If Not tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).IsTupleType Then
441
namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1), NamedTypeSymbol)
442
Loop While namedTypeSymbol.Arity =
TupleTypeSymbol
.RestPosition
451
Dim typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers) = ArrayBuilder(Of TypeWithModifiers).GetInstance(
TupleTypeSymbol
.RestPosition)
453
Dim extensionTuple As
TupleTypeSymbol
=
TupleTypeSymbol
.Create(CType(Nothing, Location), tupleCompatibleType, Nothing, Nothing, Nothing)
455
tupleCompatibleType =
TupleTypeSymbol
.ReplaceRestExtensionType(tupleCompatibleType, typeArgumentsBuilder, extensionTuple)
464
Private Shared Function ReplaceRestExtensionType(tupleCompatibleType As NamedTypeSymbol, typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers), extensionTuple As
TupleTypeSymbol
) As NamedTypeSymbol
470
For i As Integer = 0 To
TupleTypeSymbol
.RestPosition - 1 - 1
476
If(hasTypeArgumentsCustomModifiers, tupleCompatibleType.GetTypeArgumentCustomModifiers(
TupleTypeSymbol
.RestPosition - 1), Nothing)))
483
Friend Function WithUnderlyingType(newUnderlyingType As NamedTypeSymbol) As
TupleTypeSymbol
485
Return
TupleTypeSymbol
.Create(Me._locations, newUnderlyingType, Me._elementLocations, Me._providedElementNames, Me._errorPositions)
488
Friend Function WithElementNames(newElementNames As ImmutableArray(Of String)) As
TupleTypeSymbol
511
If namedTypeSymbol.Arity <>
TupleTypeSymbol
.RestPosition Then
514
namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleUnderlyingType
526
Dim length As Integer = Math.Min(namedTypeSymbol.Arity,
TupleTypeSymbol
.RestPosition - 1)
528
If namedTypeSymbol.Arity <>
TupleTypeSymbol
.RestPosition Then
531
namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1), NamedTypeSymbol)
539
namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(
TupleTypeSymbol
.RestPosition - 1).TupleUnderlyingType
552
Dim chainLength As Integer =
TupleTypeSymbol
.NumberOfValueTuples(numElements, remainder)
554
Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(remainder))
560
Dim namedTypeSymbol As NamedTypeSymbol = wellKnownType.Construct(ImmutableArray.Create(Of TypeSymbol)(elementTypes, (chainLength - 1) * (
TupleTypeSymbol
.RestPosition - 1), remainder))
563
Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(
TupleTypeSymbol
.RestPosition))
569
Dim typeArguments As ImmutableArray(Of TypeSymbol) = ImmutableArray.Create(Of TypeSymbol)(elementTypes, ([loop] - 1) * (
TupleTypeSymbol
.RestPosition - 1),
TupleTypeSymbol
.RestPosition - 1).Add(namedTypeSymbol)
580
Dim num As Integer =
TupleTypeSymbol
.NumberOfValueTuples(cardinality, arity)
581
Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(arity))
585
Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(
TupleTypeSymbol
.GetTupleType(
TupleTypeSymbol
.RestPosition))
591
If arity >
TupleTypeSymbol
.RestPosition Then
595
Return
TupleTypeSymbol
.tupleTypes(arity - 1)
599
If arity >
TupleTypeSymbol
.RestPosition Then
603
Return
TupleTypeSymbol
.tupleCtors(arity - 1)
607
Return
TupleTypeSymbol
.tupleMembers(arity - 1)(position - 1)
624
If
TupleTypeSymbol
.IsElementNameForbidden(name) Then
632
If num > 0 AndAlso IdentifierComparison.Equals(name,
TupleTypeSymbol
.TupleMemberName(num)) Then
651
Dim wellKnownMemberInType As Symbol =
TupleTypeSymbol
.GetWellKnownMemberInType(type, relativeMember)
881
Dim num As Integer = Math.Min(underlying.Arity,
TupleTypeSymbol
.RestPosition - 1)
883
Dim tupleTypeMember As WellKnownMember =
TupleTypeSymbol
.GetTupleTypeMember(underlying.Arity, i + 1)
884
fieldsForElements.Add(CType(
TupleTypeSymbol
.GetWellKnownMemberInType(underlying, tupleTypeMember), FieldSymbol))
985
Dim otherTuple = TryCast(obj,
TupleTypeSymbol
)
1066
result =
TupleTypeSymbol
.Create(CType(target, NamedTypeSymbol))
1079
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)