1 write to AdaptedNamedTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Emit\NamedTypeSymbolAdapter.vb (1)
1003
AdaptedNamedTypeSymbol
= underlyingNamedTypeSymbol
175 references to AdaptedNamedTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (175)
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
289
diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_EncNoPIAReference, embeddedType.
AdaptedNamedTypeSymbol
), Location.None)
Emit\NamedTypeSymbolAdapter.vb (132)
35
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
36
Return
AdaptedNamedTypeSymbol
.TypeKind = TypeKind.Enum
42
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
43
Return
AdaptedNamedTypeSymbol
.IsValueType
48
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
55
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
57
If
AdaptedNamedTypeSymbol
.IsDefinition Then
58
Return
AdaptedNamedTypeSymbol
.PrimitiveTypeCode
66
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
67
Dim peNamedType As PENamedTypeSymbol = TryCast(
AdaptedNamedTypeSymbol
, PENamedTypeSymbol)
78
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
85
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
87
If Not
AdaptedNamedTypeSymbol
.IsDefinition AndAlso
AdaptedNamedTypeSymbol
.Arity > 0 AndAlso
AdaptedNamedTypeSymbol
.ConstructedFrom IsNot
AdaptedNamedTypeSymbol
Then
96
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
103
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
105
If
AdaptedNamedTypeSymbol
.IsDefinition AndAlso
AdaptedNamedTypeSymbol
.ContainingType Is Nothing Then
113
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
116
If
AdaptedNamedTypeSymbol
.ContainingType Is Nothing AndAlso
AdaptedNamedTypeSymbol
.IsDefinition AndAlso
AdaptedNamedTypeSymbol
.ContainingModule.Equals(moduleBeingBuilt.SourceModule) Then
124
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
125
If
AdaptedNamedTypeSymbol
.ContainingType IsNot Nothing Then
133
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
140
If
AdaptedNamedTypeSymbol
.ContainingType IsNot Nothing AndAlso
AdaptedNamedTypeSymbol
.IsDefinition AndAlso
AdaptedNamedTypeSymbol
.ContainingModule.Equals(moduleBeingBuilt.SourceModule) Then
148
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
150
If Not
AdaptedNamedTypeSymbol
.IsDefinition AndAlso (
AdaptedNamedTypeSymbol
.Arity = 0 OrElse
AdaptedNamedTypeSymbol
.ConstructedFrom Is
AdaptedNamedTypeSymbol
) Then
151
Debug.Assert(
AdaptedNamedTypeSymbol
.ContainingType IsNot Nothing AndAlso
AdaptedNamedTypeSymbol
.ContainingType.IsOrInGenericType())
159
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
169
If
AdaptedNamedTypeSymbol
.IsDefinition AndAlso
170
AdaptedNamedTypeSymbol
.ContainingModule.Equals(moduleBeingBuilt.SourceModule) Then
179
If Not
AdaptedNamedTypeSymbol
.IsDefinition Then
180
If
AdaptedNamedTypeSymbol
.Arity > 0 AndAlso
AdaptedNamedTypeSymbol
.ConstructedFrom IsNot
AdaptedNamedTypeSymbol
Then
189
Dim asDefinition As Boolean = (
AdaptedNamedTypeSymbol
.ContainingModule.Equals(moduleBeingBuilt.SourceModule))
190
If
AdaptedNamedTypeSymbol
.ContainingType Is Nothing Then
218
Dim layout =
AdaptedNamedTypeSymbol
.Layout
224
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
228
Dim baseType As NamedTypeSymbol =
AdaptedNamedTypeSymbol
.BaseTypeNoUseSiteDiagnostics
230
If
AdaptedNamedTypeSymbol
.TypeKind = TypeKind.Submission Then
233
baseType =
AdaptedNamedTypeSymbol
.ContainingAssembly.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object)
244
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
251
For Each e As EventSymbol In
AdaptedNamedTypeSymbol
.GetEventsToEmit()
260
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
267
If
AdaptedNamedTypeSymbol
.IsInterface Then
272
Dim sourceNamedType = TryCast(
AdaptedNamedTypeSymbol
, SourceNamedTypeSymbol)
275
For Each member In
AdaptedNamedTypeSymbol
.GetMembersForCci()
281
Dim syntheticMethods = moduleBeingBuilt.GetSynthesizedMethods(
AdaptedNamedTypeSymbol
)
329
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
337
Dim isStruct =
AdaptedNamedTypeSymbol
.IsStructureType()
339
For Each field In
AdaptedNamedTypeSymbol
.GetFieldsToEmit()
346
Dim syntheticFields = DirectCast(context.Module, PEModuleBuilder).GetSynthesizedFields(
AdaptedNamedTypeSymbol
)
364
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
372
Return
AdaptedNamedTypeSymbol
.TypeParameters.Select(Function(t) t.GetCciAdapter())
381
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
394
Return CType(
AdaptedNamedTypeSymbol
.Arity, UShort)
400
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
406
Return
AdaptedNamedTypeSymbol
.HasDeclarativeSecurity
412
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
416
For Each [interface] In
AdaptedNamedTypeSymbol
.GetInterfacesToEmit()
422
Yield [interface].GetTypeRefWithAttributes(
AdaptedNamedTypeSymbol
.DeclaringCompilation, typeRef)
428
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
434
Return
AdaptedNamedTypeSymbol
.IsMetadataAbstract
440
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
448
Select Case
AdaptedNamedTypeSymbol
.TypeKind
455
Dim cctor =
AdaptedNamedTypeSymbol
.SharedConstructors.FirstOrDefault
458
Debug.Assert(
AdaptedNamedTypeSymbol
.SharedConstructors.Length = 1)
469
For Each member In
AdaptedNamedTypeSymbol
.GetMembers()
491
Dim sourceNamedType = TryCast(
AdaptedNamedTypeSymbol
, SourceMemberContainerTypeSymbol)
503
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
510
Return
AdaptedNamedTypeSymbol
.IsComImport
516
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
523
Return
AdaptedNamedTypeSymbol
.Arity <> 0
529
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
536
Return
AdaptedNamedTypeSymbol
.IsInterface
542
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
548
Return
AdaptedNamedTypeSymbol
.IsDelegateType()
554
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
567
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
574
Return
AdaptedNamedTypeSymbol
.IsSerializable
580
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
587
Return
AdaptedNamedTypeSymbol
.HasSpecialName
593
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
600
Return
AdaptedNamedTypeSymbol
.IsWindowsRuntimeImport
606
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
612
Return
AdaptedNamedTypeSymbol
.IsMetadataSealed
618
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
621
Return
AdaptedNamedTypeSymbol
.Layout.Kind
626
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
633
For Each method In
AdaptedNamedTypeSymbol
.GetMethodsToEmit()
640
Dim syntheticMethods = DirectCast(context.Module, PEModuleBuilder).GetSynthesizedMethods(
AdaptedNamedTypeSymbol
)
651
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
661
Dim nestedTypes =
AdaptedNamedTypeSymbol
.GetTypeMembers() ' Ordered.
667
If
AdaptedNamedTypeSymbol
.IsEmbedded Then
681
Dim syntheticNested = containingModule.GetSynthesizedTypes(
AdaptedNamedTypeSymbol
)
690
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
697
For Each [property] As PropertySymbol In
AdaptedNamedTypeSymbol
.GetPropertiesToEmit()
705
Dim syntheticProperties = DirectCast(context.Module, PEModuleBuilder).GetSynthesizedProperties(
AdaptedNamedTypeSymbol
)
717
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
724
Debug.Assert(
AdaptedNamedTypeSymbol
.HasDeclarativeSecurity)
725
Dim securityAttributes As IEnumerable(Of SecurityAttribute) =
AdaptedNamedTypeSymbol
.GetSecurityInformation()
733
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
736
Return CUInt(
AdaptedNamedTypeSymbol
.Layout.Size)
742
Debug.Assert(Not
AdaptedNamedTypeSymbol
.IsAnonymousType)
745
Return
AdaptedNamedTypeSymbol
.MarshallingCharSet
757
Return
AdaptedNamedTypeSymbol
.MangleName
770
Return
AdaptedNamedTypeSymbol
.Name
777
Return moduleBeingBuilt.Translate(
AdaptedNamedTypeSymbol
.ContainingModule, context.Diagnostics)
783
Return If(
AdaptedNamedTypeSymbol
.GetEmittedNamespaceName(),
AdaptedNamedTypeSymbol
.ContainingNamespace.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))
791
Return PEModuleBuilder.MemberVisibility(
AdaptedNamedTypeSymbol
) = Cci.TypeMemberVisibility.Public
801
Return moduleBeingBuilt.Translate(
AdaptedNamedTypeSymbol
.ContainingType, syntaxNodeOpt:=DirectCast(context.SyntaxNode, VisualBasicSyntaxNode), diagnostics:=context.Diagnostics, needDeclaration:=
AdaptedNamedTypeSymbol
.IsDefinition)
808
Debug.Assert(
AdaptedNamedTypeSymbol
.ContainingType IsNot Nothing)
811
Return
AdaptedNamedTypeSymbol
.ContainingType.GetCciAdapter()
818
Debug.Assert(
AdaptedNamedTypeSymbol
.ContainingType IsNot Nothing)
821
Return PEModuleBuilder.MemberVisibility(
AdaptedNamedTypeSymbol
)
829
Dim hasModifiers =
AdaptedNamedTypeSymbol
.HasTypeArgumentsCustomModifiers
832
Dim arguments =
AdaptedNamedTypeSymbol
.TypeArgumentsNoUseSiteDiagnostics
837
Dim modifiers =
AdaptedNamedTypeSymbol
.GetTypeArgumentCustomModifiers(i)
857
Return moduleBeingBuilt.Translate(
AdaptedNamedTypeSymbol
.OriginalDefinition, syntaxNodeOpt:=DirectCast(context.SyntaxNode, VisualBasicSyntaxNode),
1008
Return
AdaptedNamedTypeSymbol
Emit\NoPia\EmbeddedEvent.vb (3)
66
For Each attrData In underlyingContainingType.
AdaptedNamedTypeSymbol
.GetAttributes()
67
If attrData.IsTargetAttribute(underlyingContainingType.
AdaptedNamedTypeSymbol
, AttributeDescription.ComEventInterfaceAttribute) Then
87
EmbeddedTypesManager.ReportDiagnostic(diagnostics, ERRID.ERR_SourceInterfaceMustBeInterface, syntaxNodeOpt, underlyingContainingType.
AdaptedNamedTypeSymbol
, UnderlyingEvent.AdaptedEventSymbol)
Emit\NoPia\EmbeddedType.vb (32)
28
Debug.Assert(underlyingNamedType.
AdaptedNamedTypeSymbol
.IsDefinition)
29
Debug.Assert(underlyingNamedType.
AdaptedNamedTypeSymbol
.IsTopLevelType())
30
Debug.Assert(Not underlyingNamedType.
AdaptedNamedTypeSymbol
.IsGenericType)
34
Debug.Assert(UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsInterfaceType())
43
For Each m In UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetMethodsToEmit()
53
For Each [interface] In UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetInterfacesToEmit()
60
Return refs.IndexOf(UnderlyingNamedType.
AdaptedNamedTypeSymbol
.ContainingAssembly, ReferenceEqualityComparer.Instance)
65
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.DeclaredAccessibility = Accessibility.Public
70
Dim baseType = UnderlyingNamedType.
AdaptedNamedTypeSymbol
.BaseTypeNoUseSiteDiagnostics
76
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetFieldsToEmit().Select(Function(s) s.GetCciAdapter())
84
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetMethodsToEmit().Select(Function(s) s?.GetCciAdapter())
92
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetEventsToEmit().Select(Function(s) s.GetCciAdapter())
100
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetPropertiesToEmit().Select(Function(s) s.GetCciAdapter())
111
For Each [interface] In UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetInterfacesToEmit()
116
Yield [interface].GetTypeRefWithAttributes(UnderlyingNamedType.
AdaptedNamedTypeSymbol
.DeclaringCompilation, typeRef)
122
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsMetadataAbstract
128
Select Case UnderlyingNamedType.
AdaptedNamedTypeSymbol
.TypeKind
140
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsComImport
146
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsInterfaceType()
152
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsDelegateType()
158
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsSerializable
164
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.HasSpecialName
170
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsWindowsRuntimeImport
176
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsMetadataSealed
181
Return If(UnderlyingNamedType.
AdaptedNamedTypeSymbol
.IsStructureType(), UnderlyingNamedType.
AdaptedNamedTypeSymbol
.Layout, Nothing)
186
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.MarshallingCharSet
191
Return UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetCustomAttributesToEmit(moduleBuilder)
218
Dim guidString = TypeManager.GetAssemblyGuidString(UnderlyingNamedType.
AdaptedNamedTypeSymbol
.ContainingAssembly)
221
New TypedConstant(stringType, TypedConstantKind.Primitive, UnderlyingNamedType.
AdaptedNamedTypeSymbol
.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat))),
230
EmbeddedTypesManager.ReportDiagnostic(diagnostics, ERRID.ERR_NoPIAAttributeMissing2, syntaxNodeOpt, UnderlyingNamedType.
AdaptedNamedTypeSymbol
, description.FullName)
234
For Each s In UnderlyingNamedType.
AdaptedNamedTypeSymbol
.GetMembers(defaultMember)
Emit\NoPia\EmbeddedTypesManager.vb (7)
134
_assemblyGuidMap.TryAdd(t.UnderlyingNamedType.
AdaptedNamedTypeSymbol
.ContainingAssembly, Nothing)
143
Dim underlyingTypeA = typeA.UnderlyingNamedType.
AdaptedNamedTypeSymbol
144
Dim underlyingTypeB = typeB.UnderlyingNamedType.
AdaptedNamedTypeSymbol
154
Dim underlyingType = type.UnderlyingNamedType.
AdaptedNamedTypeSymbol
373
ReportNotEmbeddableSymbol(ERRID.ERR_InvalidStructMemberNoPIA1, type.UnderlyingNamedType.
AdaptedNamedTypeSymbol
, syntaxNodeOpt, diagnostics, Me)
402
Select Case type.UnderlyingNamedType.
AdaptedNamedTypeSymbol
.TypeKind
405
ReportNotEmbeddableSymbol(ERRID.ERR_InvalidStructMemberNoPIA1, type.UnderlyingNamedType.
AdaptedNamedTypeSymbol
, syntaxNodeOpt, diagnostics, Me)