3 instantiations of PEModuleSymbol
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
82
modules[i] = new
PEModuleSymbol
(this, assembly.Modules[i], importOptions, i);
Symbols\Retargeting\RetargetingAssemblySymbol.cs (1)
115
modules[i] = new
PEModuleSymbol
(this, under.Module, under.ImportOptions, i);
Symbols\Source\SourceAssemblySymbol.cs (1)
140
moduleBuilder.Add(new
PEModuleSymbol
(this, netModule, importOptions, moduleBuilder.Count));
523 references to PEModuleSymbol
Microsoft.CodeAnalysis.CSharp (160)
Compilation\CSharpCompilation.cs (2)
3418
var
m = (Symbols.Metadata.PE.
PEModuleSymbol
)modules[i];
Compiler\ClsComplianceChecker.cs (2)
136
var
peModule = (Symbols.Metadata.PE.
PEModuleSymbol
)module;
DocumentationComments\PEDocumentationCommentUtils.cs (1)
21
PEModuleSymbol
containingPEModule,
Emitter\Model\PEAssemblyBuilder.cs (1)
172
foreach (EmbeddedResource resource in ((Symbols.Metadata.PE.
PEModuleSymbol
)modules[i]).Module.GetEmbeddedResourcesOrThrow())
Symbols\Attributes\PEAttributeData.cs (1)
27
internal PEAttributeData(
PEModuleSymbol
moduleSymbol, CustomAttributeHandle handle)
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
68
PEModuleSymbol
containingModule,
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
34
PEModuleSymbol
moduleSymbol,
Symbols\Metadata\PE\MetadataDecoder.cs (6)
21
internal class MetadataDecoder : MetadataDecoder<
PEModuleSymbol
, TypeSymbol, MethodSymbol, FieldSymbol, Symbol>
34
PEModuleSymbol
moduleSymbol,
41
PEModuleSymbol
moduleSymbol,
48
PEModuleSymbol
moduleSymbol) :
53
private MetadataDecoder(
PEModuleSymbol
moduleSymbol, PENamedTypeSymbol typeContextOpt, PEMethodSymbol methodContextOpt)
64
internal
PEModuleSymbol
ModuleSymbol
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
16
internal static TypeSymbol TransformType(TypeSymbol type, EntityHandle handle,
PEModuleSymbol
containingModule, TypeSymbol? containingType)
Symbols\Metadata\PE\NullableTypeDecoder.cs (1)
23
PEModuleSymbol
containingModule,
Symbols\Metadata\PE\PEAssemblySymbol.cs (2)
278
internal
PEModuleSymbol
PrimaryModule
282
return (
PEModuleSymbol
)_modules[0];
Symbols\Metadata\PE\PEEventSymbol.cs (9)
53
PEModuleSymbol
moduleSymbol,
168
NamedTypeSymbol eventRegistrationTokenTable_T = ((
PEModuleSymbol
)(this.ContainingModule)).EventRegistrationTokenTable_T;
191
NamedTypeSymbol token = ((
PEModuleSymbol
)(this.ContainingModule)).EventRegistrationToken;
364
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
413
PEModuleSymbol
moduleSymbol,
440
PEModuleSymbol
moduleSymbol,
480
PEModuleSymbol
containingPEModule = _containingType.ContainingPEModule;
501
ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (
PEModuleSymbol
)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PEFieldSymbol.cs (9)
135
PEModuleSymbol
moduleSymbol,
307
var
moduleSymbol = _containingType.ContainingPEModule;
351
PEModuleSymbol
containingPEModule = this.ContainingPEModule;
367
private
PEModuleSymbol
ContainingPEModule
582
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
615
var
containingPEModuleSymbol = _containingType.ContainingPEModule;
648
PEModuleSymbol
containingPEModule = _containingType.ContainingPEModule;
669
ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (
PEModuleSymbol
)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (3)
26
private readonly
PEModuleSymbol
_moduleSymbol;
28
internal PEGlobalNamespaceSymbol(
PEModuleSymbol
moduleSymbol)
42
internal override
PEModuleSymbol
ContainingPEModule
Symbols\Metadata\PE\PEMethodSymbol.cs (15)
365
/// In many scenarios it is possible to avoid allocating this, thus saving total space in <see cref="
PEModuleSymbol
"/>.
374
PEModuleSymbol
moduleSymbol,
648
var
moduleSymbol = _containingType.ContainingPEModule;
803
var
moduleSymbol = _containingType.ContainingPEModule;
893
var
moduleSymbol = _containingType.ContainingPEModule;
935
var
moduleSymbol = _containingType.ContainingPEModule;
954
var
containingPEModuleSymbol = _containingType.ContainingPEModule;
1257
var
moduleSymbol = _containingType.ContainingPEModule;
1352
var
moduleSymbol = _containingType.ContainingPEModule;
1393
_containingType.ContainingPEModule.RefSafetyRulesVersion ==
PEModuleSymbol
.RefSafetyRulesAttributeVersion.UnrecognizedAttribute)
1421
var
containingModule = _containingType.ContainingPEModule;
1533
var result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, (
PEModuleSymbol
)ContainingModule, ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: MethodKind == MethodKind.Constructor);
1563
var
containingModule = (
PEModuleSymbol
)ContainingModule;
1643
var
moduleSymbol = _containingType.ContainingPEModule;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (24)
175
PEModuleSymbol
moduleSymbol,
211
private static void GetGenericInfo(
PEModuleSymbol
moduleSymbol, TypeDefinitionHandle handle, out GenericParameterHandleCollection genericParameterHandles, out ushort arity, out BadImageFormatException mrEx)
228
PEModuleSymbol
moduleSymbol,
272
PEModuleSymbol
moduleSymbol,
364
internal
PEModuleSymbol
ContainingPEModule
505
var
moduleSymbol = ContainingPEModule;
534
var
moduleSymbol = ContainingPEModule;
554
var
moduleSymbol = ContainingPEModule;
762
var
moduleSymbol = ContainingPEModule;
900
var
moduleSymbol = this.ContainingPEModule;
1190
var
moduleSymbol = this.ContainingPEModule;
1276
var
moduleSymbol = this.ContainingPEModule;
1566
var
moduleSymbol = this.ContainingPEModule;
1719
var
moduleSymbol = this.ContainingPEModule;
1849
var
moduleSymbol = this.ContainingPEModule;
1885
var
moduleSymbol = this.ContainingPEModule;
1944
var
moduleSymbol = this.ContainingPEModule;
1971
var
moduleSymbol = this.ContainingPEModule;
2003
var
moduleSymbol = this.ContainingPEModule;
2252
var
moduleSymbol = this.ContainingPEModule;
2280
var
moduleSymbol = this.ContainingPEModule;
2455
PEModuleSymbol
moduleSymbol,
2524
PEModuleSymbol
moduleSymbol,
2596
var
moduleSymbol = ContainingPEModule;
Symbols\Metadata\PE\PENamespaceSymbol.cs (2)
160
internal abstract
PEModuleSymbol
ContainingPEModule { get; }
246
var
moduleSymbol = ContainingPEModule;
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (1)
89
internal override
PEModuleSymbol
ContainingPEModule
Symbols\Metadata\PE\PEParameterSymbol.cs (11)
157
private readonly
PEModuleSymbol
_moduleSymbol;
182
PEModuleSymbol
moduleSymbol,
209
PEModuleSymbol
moduleSymbol,
225
PEModuleSymbol
moduleSymbol,
361
PEModuleSymbol
moduleSymbol,
407
PEModuleSymbol
moduleSymbol,
1017
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
1123
=> PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, (
PEModuleSymbol
)ContainingModule, Handle, allowedFeatures: CompilerFeatureRequiredFeatures.None, decoder);
1129
var
containingModule = (
PEModuleSymbol
)ContainingModule;
Symbols\Metadata\PE\PEPropertySymbol.cs (12)
122
PEModuleSymbol
moduleSymbol,
156
PEModuleSymbol
moduleSymbol,
522
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
537
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
640
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
764
PEModuleSymbol
moduleSymbol,
837
PEModuleSymbol
containingPEModule = _containingType.ContainingPEModule;
868
ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (
PEModuleSymbol
)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
891
PEModuleSymbol
moduleSymbol,
Symbols\Metadata\PE\PETypeParameterSymbol.cs (16)
47
PEModuleSymbol
moduleSymbol,
56
PEModuleSymbol
moduleSymbol,
65
PEModuleSymbol
moduleSymbol,
159
var
moduleSymbol = ((
PEModuleSymbol
)this.ContainingModule);
249
private MetadataDecoder GetDecoder(
PEModuleSymbol
moduleSymbol)
264
private TypeWithAnnotations GetConstraintTypeOrDefault(
PEModuleSymbol
moduleSymbol, MetadataReader metadataReader, MetadataDecoder tokenDecoder, GenericParameterConstraintHandle constraintHandle, ref bool hasUnmanagedModreqPattern)
427
return GetConstraintHandleCollection(((
PEModuleSymbol
)this.ContainingModule).Module);
476
if (((
PEModuleSymbol
)this.ContainingModule).Module.HasNullableAttribute(_handle, out byte value, out _))
520
var
moduleSymbol = ((
PEModuleSymbol
)this.ContainingModule);
635
var
containingPEModuleSymbol = (
PEModuleSymbol
)this.ContainingModule;
711
=> PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, (
PEModuleSymbol
)ContainingModule, Handle, CompilerFeatureRequiredFeatures.None, decoder);
717
var
containingModule = (
PEModuleSymbol
)ContainingModule;
Symbols\Metadata\PE\PEUtilities.cs (1)
11
internal static DiagnosticInfo? DeriveCompilerFeatureRequiredAttributeDiagnostic(Symbol symbol,
PEModuleSymbol
module, EntityHandle handle, CompilerFeatureRequiredFeatures allowedFeatures, MetadataDecoder decoder)
Symbols\Metadata\PE\SymbolFactory.cs (12)
14
internal sealed class SymbolFactory : SymbolFactory<
PEModuleSymbol
, TypeSymbol>
18
internal override TypeSymbol GetMDArrayTypeSymbol(
PEModuleSymbol
moduleSymbol, int rank, TypeSymbol elementType, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers,
29
internal override TypeSymbol GetSpecialType(
PEModuleSymbol
moduleSymbol, SpecialType specialType)
34
internal override TypeSymbol GetSystemTypeSymbol(
PEModuleSymbol
moduleSymbol)
39
internal override TypeSymbol MakePointerTypeSymbol(
PEModuleSymbol
moduleSymbol, TypeSymbol type, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers)
49
internal override TypeSymbol MakeFunctionPointerTypeSymbol(
PEModuleSymbol
moduleSymbol, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes)
54
internal override TypeSymbol GetEnumUnderlyingType(
PEModuleSymbol
moduleSymbol, TypeSymbol type)
59
internal override Cci.PrimitiveTypeCode GetPrimitiveTypeCode(
PEModuleSymbol
moduleSymbol, TypeSymbol type)
64
internal override TypeSymbol GetSZArrayTypeSymbol(
PEModuleSymbol
moduleSymbol, TypeSymbol elementType, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers)
74
internal override TypeSymbol GetUnsupportedMetadataTypeSymbol(
PEModuleSymbol
moduleSymbol, BadImageFormatException exception)
80
PEModuleSymbol
moduleSymbol,
161
internal override TypeSymbol MakeUnboundIfGeneric(
PEModuleSymbol
moduleSymbol, TypeSymbol type)
Symbols\Metadata\PE\TupleTypeDecoder.cs (3)
26
/// <see cref="DecodeTupleTypesIfApplicable(TypeSymbol, EntityHandle,
PEModuleSymbol
)"/>
83
PEModuleSymbol
containingModule)
103
PEModuleSymbol
containingModule)
Symbols\ObsoleteAttributeHelpers.cs (2)
29
internal static void InitializeObsoleteDataFromMetadata(ref ObsoleteAttributeData data, EntityHandle token,
PEModuleSymbol
containingModule, bool ignoreByRefLikeMarker, bool ignoreRequiredMemberMarker)
42
internal static ObsoleteAttributeData GetObsoleteDataFromMetadata(EntityHandle token,
PEModuleSymbol
containingModule, bool ignoreByRefLikeMarker, bool ignoreRequiredMemberMarker)
Symbols\Retargeting\RetargetingAssemblySymbol.cs (2)
114
PEModuleSymbol
under = (
PEModuleSymbol
)underlyingAssembly.Modules[i];
Symbols\Retargeting\RetargetingSymbolTranslator.cs (5)
304
PEModuleSymbol
addedModule = (
PEModuleSymbol
)this.RetargetingAssembly.Modules[module.Ordinal];
305
Debug.Assert(ReferenceEquals(((
PEModuleSymbol
)module).Module, addedModule.Module));
401
private static NamedTypeSymbol RetargetNamedTypeDefinition(PENamedTypeSymbol type,
PEModuleSymbol
addedModule)
404
ReferenceEquals(((
PEModuleSymbol
)type.ContainingModule).Module, addedModule.Module));
Symbols\Source\SourceAssemblySymbol.cs (11)
185
var
peModuleSymbol = (Metadata.PE.
PEModuleSymbol
)_modules[i];
996
if (!((
PEModuleSymbol
)m).Module.IsCOFFOnly)
1022
var
m = (
PEModuleSymbol
)_modules[i];
1281
var
peModuleSymbol = (Metadata.PE.
PEModuleSymbol
)_modules[i];
1385
var
peModuleSymbol = (Metadata.PE.
PEModuleSymbol
)_modules[i];
2825
var
peModuleSymbol = (Metadata.PE.
PEModuleSymbol
)_modules[i];
Symbols\Symbol.cs (1)
213
case
PEModuleSymbol
:
Symbols\TypeSymbol.cs (2)
893
implementingTypeIsFromSomeCompilation = currType.OriginalDefinition.ContainingModule is not
PEModuleSymbol
;
1475
if ((object)implementingMember != null && implementingMember.OriginalDefinition.ContainingModule is not
PEModuleSymbol
&& implementingMember.IsExplicitInterfaceImplementation())
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (76)
CodeGen\CodeGenDynamicTests.cs (2)
2283
var
pe = (
PEModuleSymbol
)module;
CodeGen\CodeGenOverridingAndHiding.cs (1)
4136
var allAttributes = ((
PEModuleSymbol
)parameter.ContainingModule).GetCustomAttributesForToken(peParameter.Handle);
CodeGen\CodeGenReadonlyStructTests.cs (10)
837
var
peModule = (
PEModuleSymbol
)module;
1353
var
peModule = (
PEModuleSymbol
)module;
1426
var
peModule = (
PEModuleSymbol
)module;
1491
var
peModule = (
PEModuleSymbol
)module;
2601
var
peModule = (
PEModuleSymbol
)module;
CodeGen\CodeGenTupleTest.cs (1)
20550
bool isMetadata = m is
PEModuleSymbol
;
Emit\CompilationEmitTests.cs (4)
1063
var
module = (
PEModuleSymbol
)referencedAssembly.Modules[0];
1145
var
module = (
PEModuleSymbol
)referencedAssembly.Modules[0];
Emit\EditAndContinue\SymbolMatcherTests.cs (14)
555
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
624
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
1324
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
1757
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
1824
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
1883
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
1950
var
peModule0 = (
PEModuleSymbol
)peAssemblySymbol0.Modules[0];
Emit\EmitMetadataTests.cs (3)
474
Assert.Equal(10, ((
PEModuleSymbol
)module).Module.GetMetadataReader().TypeReferences.Count);
523
var
peModuleSymbol = module as
PEModuleSymbol
;
Emit\NoPiaEmbedTypes.cs (40)
1170
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
1454
var metadata = ((
PEModuleSymbol
)module).Module;
1476
ParamInfo<TypeSymbol>[] paramInfo = new MetadataDecoder((
PEModuleSymbol
)module, itest17).GetSignatureForMethod(gapMethodDef, out signatureHeader, out mrEx);
1729
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
1902
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
1989
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
2197
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
2706
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
2778
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
2842
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
2903
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
2969
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3035
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3100
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3165
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3233
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3324
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3383
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3448
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3755
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3850
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
3950
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4034
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4111
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4176
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4241
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4301
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4361
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4427
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
4581
Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(((
PEModuleSymbol
)compilation2.SourceModule.GetReferencedAssemblySymbols()[1].Modules[0]).LookupTopLevelMetadataTypeWithNoPiaLocalTypeUnification(ref fullName, out isNoPiaLocalType));
4599
Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(((
PEModuleSymbol
)compilation4.SourceModule.GetReferencedAssemblySymbols()[1].Modules[0]).LookupTopLevelMetadataTypeWithNoPiaLocalTypeUnification(ref fullName, out isNoPiaLocalType));
5308
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
5668
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
5736
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
5785
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
5790
Assert.Equal("x", ((
PEModuleSymbol
)module).Module.GetParamNameOrThrow(p.Handle));
5794
Assert.Equal("value", ((
PEModuleSymbol
)module).Module.GetParamNameOrThrow(p.Handle));
5798
Assert.Equal("Param", ((
PEModuleSymbol
)module).Module.GetParamNameOrThrow(p.Handle));
5811
Assert.True(((
PEModuleSymbol
)p1.ContainingModule).Module.MetadataReader.GetParameter(p1.Handle).Name.IsNil);
5820
Assert.True(((
PEModuleSymbol
)p2.ContainingModule).Module.MetadataReader.GetParameter(p2.Handle).Name.IsNil);
Emit\OptionalArgumentsTests.cs (1)
464
var attribute = ((
PEModuleSymbol
)module).GetCustomAttributesForToken(field.Handle).Single();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (36)
Attributes\AttributeTests.cs (1)
1594
var metadata = ((
PEModuleSymbol
)module).Module;
Attributes\AttributeTests_Assembly.cs (3)
482
Assert.Equal(2, ((
PEModuleSymbol
)m).GetReferencedAssemblySymbols().Length);
1780
var
module = (
PEModuleSymbol
)appCompilation.Assembly.Modules[1];
Attributes\AttributeTests_IsByRefLike.cs (12)
44
var
peModule = (
PEModuleSymbol
)module;
101
var
peModule = (
PEModuleSymbol
)module;
679
if (module is
PEModuleSymbol
peModule)
763
var
peModule = (
PEModuleSymbol
)module;
819
var
peModule = (
PEModuleSymbol
)module;
1045
var
peModule = (
PEModuleSymbol
)peType.ContainingModule;
1063
private static void AssertHasCompilerFeatureRequired(bool hasCompilerFeatureRequired, PENamedTypeSymbol peType,
PEModuleSymbol
peModule, MetadataDecoder decoder)
Attributes\AttributeTests_IsUnmanaged.cs (1)
822
var attributes = ((
PEModuleSymbol
)typeParameter.ContainingModule).GetCustomAttributesForToken(((PETypeParameterSymbol)typeParameter).Handle);
Attributes\AttributeTests_LifetimeAnnotation.cs (1)
565
var actual = ScopedRefAttributesVisitor.GetString((
PEModuleSymbol
)module);
Attributes\AttributeTests_NativeInteger.cs (1)
1636
var actual = NativeIntegerAttributesVisitor.GetString((
PEModuleSymbol
)module);
Attributes\AttributeTests_Nullable.cs (1)
5434
var actual = NullableAttributesVisitor.GetString((
PEModuleSymbol
)module);
Attributes\AttributeTests_NullableContext.cs (1)
425
var actual = NullableAttributesVisitor.GetString((
PEModuleSymbol
)module);
Attributes\AttributeTests_NullablePublicOnly.cs (1)
621
var actual = NullableAttributesVisitor.GetString((
PEModuleSymbol
)module);
Attributes\AttributeTests_ReadOnlyStruct.cs (2)
43
var
peModule = (
PEModuleSymbol
)module;
Attributes\AttributeTests_RefReadOnly.cs (4)
47
var
peModule = (
PEModuleSymbol
)module;
71
var
peModule = (
PEModuleSymbol
)module;
Attributes\AttributeTests_Synthesized.cs (4)
176
var
peModule = (
PEModuleSymbol
)module;
225
var
peModule = (
PEModuleSymbol
)module;
Attributes\AttributeTests_WellKnownAttributes.cs (2)
517
var
peModule = (
PEModuleSymbol
)module;
Attributes\WellKnownAttributesTestBase.cs (1)
91
var allAttributes = ((
PEModuleSymbol
)parameter.ContainingModule).GetCustomAttributesForToken(peParameter.Handle);
Emit\NumericIntPtrTests.cs (1)
11768
symbolValidator: module => Assert.Equal("", NativeIntegerAttributesVisitor.GetString((
PEModuleSymbol
)module)),
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (21)
CompilationContext.cs (2)
343
var typeNameDecoder = new EETypeNameDecoder(Compilation, (
PEModuleSymbol
)_currentFrame.ContainingModule);
967
var typeNameDecoder = new EETypeNameDecoder(binder.Compilation, (
PEModuleSymbol
)substitutedSourceMethod.ContainingModule);
CompilationExtensions.cs (6)
21
private static PENamedTypeSymbol GetType(
PEModuleSymbol
module, TypeDefinitionHandle typeHandle)
35
var metadataDecoder = new MetadataDecoder((
PEModuleSymbol
)method.ContainingModule);
54
var
module = compilation.GetModule(moduleVersionId);
62
internal static
PEModuleSymbol
GetModule(this CSharpCompilation compilation, Guid moduleVersionId)
69
var
m = (
PEModuleSymbol
)module;
CSharpEESymbolProvider.cs (1)
21
public CSharpEESymbolProvider(SourceAssemblySymbol sourceAssembly,
PEModuleSymbol
module, PEMethodSymbol method)
CSharpFrameDecoder.cs (1)
14
internal sealed class CSharpFrameDecoder : FrameDecoder<CSharpCompilation, MethodSymbol,
PEModuleSymbol
, TypeSymbol, TypeParameterSymbol>
CSharpInstructionDecoder.cs (3)
18
internal sealed class CSharpInstructionDecoder : InstructionDecoder<CSharpCompilation, MethodSymbol,
PEModuleSymbol
, TypeSymbol, TypeParameterSymbol>
171
internal override TypeNameDecoder<
PEModuleSymbol
, TypeSymbol> GetTypeNameDecoder(CSharpCompilation compilation, MethodSymbol method)
174
return new EETypeNameDecoder(compilation, (
PEModuleSymbol
)method.ContainingModule);
CSharpLanguageInstructionDecoder.cs (1)
13
internal sealed class CSharpLanguageInstructionDecoder : LanguageInstructionDecoder<CSharpCompilation, MethodSymbol,
PEModuleSymbol
, TypeSymbol, TypeParameterSymbol, ParameterSymbol>
EEAssemblyBuilder.cs (1)
51
if (symbol is
PEModuleSymbol
moduleSymbol)
EETypeNameDecoder.cs (3)
13
internal sealed class EETypeNameDecoder : TypeNameDecoder<
PEModuleSymbol
, TypeSymbol>
17
internal EETypeNameDecoder(CSharpCompilation compilation,
PEModuleSymbol
moduleSymbol) :
77
return ((
PEModuleSymbol
)module).Module.ReadAssemblyIdentityOrThrow();
EvaluationContext.cs (2)
153
var symbolProvider = new CSharpEESymbolProvider(compilation.SourceAssembly, (
PEModuleSymbol
)currentFrame.ContainingModule, currentFrame);
155
var metadataDecoder = new MetadataDecoder((
PEModuleSymbol
)currentFrame.ContainingModule, currentFrame);
Symbols\PlaceholderLocalSymbol.cs (1)
38
TypeNameDecoder<
PEModuleSymbol
, TypeSymbol> typeNameDecoder,
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (7)
ExpressionCompilerTestBase.cs (4)
244
var
module = (
PEModuleSymbol
)methodOrType.ContainingModule;
513
var
peModule = (
PEModuleSymbol
)peMethod.ContainingModule;
InstructionDecoderTests.cs (1)
456
((
PEModuleSymbol
)frame.ContainingModule).Module.GetModuleVersionIdOrThrow(),
WinMdTests.cs (2)
228
var
module = (
PEModuleSymbol
)compilation.GetMember("<>x").ContainingModule;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (61)
Semantics\InitOnlyMemberTests.cs (1)
1447
bool isSource = !(m is
PEModuleSymbol
);
Semantics\NullableReferenceTypesTests.cs (56)
16962
bool isMetadata = m is
PEModuleSymbol
;
17041
bool isMetadata = m is
PEModuleSymbol
;
17375
bool isMetadata = m is
PEModuleSymbol
;
17443
bool isMetadata = m is
PEModuleSymbol
;
17524
bool isMetadata = m is
PEModuleSymbol
;
17608
bool isMetadata = m is
PEModuleSymbol
;
28232
bool isSource = !(m is
PEModuleSymbol
);
28335
bool isSource = !(m is
PEModuleSymbol
);
28857
bool isSource = !(m is
PEModuleSymbol
);
38716
bool isSource = !(m is
PEModuleSymbol
);
38892
bool isSource = !(m is
PEModuleSymbol
);
38953
bool isSource = !(m is
PEModuleSymbol
);
42573
bool isSource = !(m is
PEModuleSymbol
);
42820
bool isSource = !(m is
PEModuleSymbol
);
45855
bool isSource = !(m is
PEModuleSymbol
);
45965
bool isSource = !(m is
PEModuleSymbol
);
73386
var b = ((
PEModuleSymbol
)m).GlobalNamespace.GetTypeMember("B");
73401
var f = ((
PEModuleSymbol
)m).GlobalNamespace.GetTypeMember("F");
93910
bool isSource = !(m is
PEModuleSymbol
);
93970
bool isSource = !(m is
PEModuleSymbol
);
94077
bool isSource = !(m is
PEModuleSymbol
);
94688
bool isSource = !(m is
PEModuleSymbol
);
94879
bool isSource = !(m is
PEModuleSymbol
);
94986
bool isSource = !(m is
PEModuleSymbol
);
95052
bool isSource = !(m is
PEModuleSymbol
);
95125
bool isSource = !(m is
PEModuleSymbol
);
95193
bool isSource = !(m is
PEModuleSymbol
);
95283
bool isSource = !(m is
PEModuleSymbol
);
95316
bool isSource = !(m is
PEModuleSymbol
);
95567
bool isSource = !(m is
PEModuleSymbol
);
96561
bool isSource = !(m is
PEModuleSymbol
);
96599
bool isSource = !(m is
PEModuleSymbol
);
96931
bool isSource = !(m is
PEModuleSymbol
);
97026
bool isSource = !(m is
PEModuleSymbol
);
97115
bool isSource = !(m is
PEModuleSymbol
);
97301
bool isSource = !(m is
PEModuleSymbol
);
97384
bool isSource = !(m is
PEModuleSymbol
);
98388
bool isSource = !(m is
PEModuleSymbol
);
98457
bool isSource = !(m is
PEModuleSymbol
);
98491
bool isSource = !(m is
PEModuleSymbol
);
98531
bool isSource = !(m is
PEModuleSymbol
);
98569
bool isSource = !(m is
PEModuleSymbol
);
98691
bool isSource = !(m is
PEModuleSymbol
);
98941
bool isSource = !(m is
PEModuleSymbol
);
99008
bool isSource = !(m is
PEModuleSymbol
);
99041
bool isSource = !(m is
PEModuleSymbol
);
99080
bool isSource = !(m is
PEModuleSymbol
);
99117
bool isSource = !(m is
PEModuleSymbol
);
99235
bool isSource = !(m is
PEModuleSymbol
);
99335
bool isSource = !(m is
PEModuleSymbol
);
99378
bool isSource = !(m is
PEModuleSymbol
);
99422
bool isSource = !(m is
PEModuleSymbol
);
101078
bool isSource = !(m is
PEModuleSymbol
);
101173
bool isSource = !(m is
PEModuleSymbol
);
101250
bool isSource = !(m is
PEModuleSymbol
);
112869
var actual = NullableAttributesVisitor.GetString((
PEModuleSymbol
)module);
Semantics\RefFieldTests.cs (4)
544
var
module = (
PEModuleSymbol
)comp.GetReferencedAssemblySymbol(refB).Modules[0];
2009
var
module = (
PEModuleSymbol
)comp.GetReferencedAssemblySymbol(refB).Modules[0];
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (145)
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
6231
((
PEModuleSymbol
)module).Module.PretendThereArentNoPiaLocalTypes();
Symbols\CompilationCreationTests.cs (7)
118
var
cyclic2Mod = (
PEModuleSymbol
)cyclic2Asm.Modules[0];
2566
PEModuleSymbol
module1 = (
PEModuleSymbol
)c1AsmSource.Modules[1];
2572
PEModuleSymbol
module2 = (
PEModuleSymbol
)c1AsmRef.Modules[1];
2997
Assert.IsType<
PEModuleSymbol
>(addedModule);
Symbols\DefaultInterfaceImplementationTests.cs (14)
222
if (m is
PEModuleSymbol
peModule)
2146
((
PEModuleSymbol
)m).Module.GetMethodDefPropsOrThrow(result.Handle, out _, out _, out _, out rva);
2724
if (m is
PEModuleSymbol
peModule)
5427
string name = m is
PEModuleSymbol
? "Item" : "this";
5438
if (m is
PEModuleSymbol
)
6248
if (m is
PEModuleSymbol
peModule)
10200
bool isSource = !(m is
PEModuleSymbol
);
10662
Assert.Equal(!(m is
PEModuleSymbol
), m1.IsAsync);
16594
bool isSource = !(m is
PEModuleSymbol
);
18191
Assert.Equal(MetadataImportOptions.Public, ((
PEModuleSymbol
)p1.ContainingModule).ImportOptions);
29930
bool isSource = !(m is
PEModuleSymbol
);
32889
if (m1.ContainingModule is
PEModuleSymbol
peModule)
33726
if (m1.ContainingModule is
PEModuleSymbol
peModule)
33842
if (m1.ContainingModule is
PEModuleSymbol
peModule)
Symbols\ExtendedPartialMethodsTests.cs (1)
2495
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
Symbols\ExtensionMethodTests.cs (1)
2605
var attr = ((
PEModuleSymbol
)module).GetCustomAttributesForToken(method.Handle).Single();
Symbols\GenericConstraintTests.cs (2)
6584
var metadata = ((
PEModuleSymbol
)module).Module;
6600
var tokenDecoder = new MetadataDecoder((
PEModuleSymbol
)module, typeI);
Symbols\IndexerTests.cs (1)
2138
Assert.Empty(((
PEModuleSymbol
)module).GetCustomAttributesForToken(peIndexer.Handle));
Symbols\Metadata\PE\BaseTypeResolution.cs (4)
219
var
module0 = assemblies[0].Modules[0] as
PEModuleSymbol
;
220
var
module1 = assemblies[1].Modules[0] as
PEModuleSymbol
;
Symbols\Metadata\PE\LoadingAttributes.cs (2)
1304
var
peModule = (
PEModuleSymbol
)module;
Symbols\Metadata\PE\LoadingFields.cs (1)
64
Assert.Same(((
PEModuleSymbol
)module2).GetCorLibType(SpecialType.System_Int32), f2.Type);
Symbols\Metadata\PE\LoadingMetadataTokens.cs (2)
44
var
peModule = (
PEModuleSymbol
)module;
Symbols\Metadata\PE\TypeForwarders.cs (10)
43
var
module1 = (
PEModuleSymbol
)assemblies[0].Modules[0];
44
var
module2 = (
PEModuleSymbol
)assemblies[1].Modules[0];
1467
if (module is
PEModuleSymbol
)
1626
var
module = (
PEModuleSymbol
)appCompilation.Assembly.Modules[1];
1640
var peReader1 = ((
PEModuleSymbol
)m).Module.GetMetadataReader();
1680
module = (
PEModuleSymbol
)appCompilation.Assembly.Modules[1];
1693
var peReader1 = ((
PEModuleSymbol
)m).Module.GetMetadataReader();
Symbols\ModuleInitializers\IgnoredTests.cs (11)
39
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
65
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
91
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
116
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
141
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
166
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
191
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
216
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
237
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
258
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
291
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
Symbols\ModuleInitializers\ModuleInitializersTests.cs (8)
93
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
128
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
222
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
781
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
965
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
972
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
1078
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
1085
Assert.Equal(MetadataImportOptions.All, ((
PEModuleSymbol
)module).ImportOptions);
Symbols\RequiredMembersTests.cs (3)
45
if (module is
PEModuleSymbol
peModule)
85
var
peModule = module as
PEModuleSymbol
;
Symbols\Source\BaseClassTests.cs (4)
1099
Assert.Same(((
PEModuleSymbol
)B1.ContainingModule).Module, ((
PEModuleSymbol
)B2.ContainingModule).Module);
1225
Assert.Same(((
PEModuleSymbol
)B1.ContainingModule).Module, ((
PEModuleSymbol
)B2.ContainingModule).Module);
Symbols\Source\EventTests.cs (6)
344
var
peModule = (
PEModuleSymbol
)module;
605
var
peModule = (
PEModuleSymbol
)module;
637
var
peModule = (
PEModuleSymbol
)module;
Symbols\StaticAbstractMembersInInterfacesTests.cs (67)
16111
if (module is
PEModuleSymbol
)
16516
if (module is
PEModuleSymbol
)
16601
if (module is
PEModuleSymbol
)
16726
if (c1M01.ContainingModule is
PEModuleSymbol
)
16819
if (module is
PEModuleSymbol
)
16893
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
16903
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
16975
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
16985
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
17057
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
17128
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
17202
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
17205
var expectedDisplay = m01.ContainingModule is
PEModuleSymbol
? "void C11<T>.I1.M01(System.Int32 x)" : "void C1<T>.M01(System.Int32 x)";
17213
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
17289
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
17292
var expectedDisplay = m01.ContainingModule is
PEModuleSymbol
? "void C11<T>.I1<T>.M01(T x)" : "void C1<T>.M01(T x)";
17300
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
17392
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
17396
if (module is
PEModuleSymbol
)
17494
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
17498
if (module is
PEModuleSymbol
)
19348
if (module is
PEModuleSymbol
)
19429
if (module is
PEModuleSymbol
)
19521
if (module is
PEModuleSymbol
)
20833
if (module is
PEModuleSymbol
)
20949
if (module is
PEModuleSymbol
)
21060
if (module is
PEModuleSymbol
)
21195
if (module is
PEModuleSymbol
)
21501
if (c1M01.ContainingModule is
PEModuleSymbol
)
21628
if (module is
PEModuleSymbol
)
21731
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
21741
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
21840
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
21942
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
21945
var expectedDisplay = m01.ContainingModule is
PEModuleSymbol
? "C11<T, U> C11<T, U>.I1<C11<T, U>, C1<T, U>>." + opName + "(C11<T, U> x, C1<T, U> y)" : "C11<T, U> C1<T, U>." + opName + "(C11<T, U> x, C1<T, U> y)";
21953
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
23002
if (module is
PEModuleSymbol
)
23093
if (module is
PEModuleSymbol
)
23777
if (module is
PEModuleSymbol
)
23869
if (module is
PEModuleSymbol
)
24129
if (module is
PEModuleSymbol
)
24221
if (module is
PEModuleSymbol
)
24439
if (module is
PEModuleSymbol
)
24640
if (module is
PEModuleSymbol
)
24842
if (c1M01.ContainingModule is
PEModuleSymbol
)
24969
if (module is
PEModuleSymbol
)
25053
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
25124
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
25780
if (module is
PEModuleSymbol
)
26420
if (module is
PEModuleSymbol
)
26694
if (module is
PEModuleSymbol
)
26967
if (module is
PEModuleSymbol
)
27182
if (module is
PEModuleSymbol
)
27293
if (module is
PEModuleSymbol
)
27507
if (c1M01.ContainingModule is
PEModuleSymbol
)
27635
if (module is
PEModuleSymbol
)
27719
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
27790
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
28705
if (module is
PEModuleSymbol
)
28730
if (module is
PEModuleSymbol
)
29292
if (module is
PEModuleSymbol
)
29407
if (module is
PEModuleSymbol
)
29562
if (c1M01.ContainingModule is
PEModuleSymbol
)
29666
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
29676
if (c1M01.OriginalDefinition.ContainingModule is
PEModuleSymbol
)
29772
Assert.True(m01.ContainingModule is RetargetingModuleSymbol or
PEModuleSymbol
);
31667
if (module is
PEModuleSymbol
)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (12)
CSharpTestBase.cs (2)
1793
return VisualizeRealIL((
PEModuleSymbol
)peModule.GetSymbol(), methodData, markers, areLocalsZeroed);
1806
internal static unsafe string VisualizeRealIL(
PEModuleSymbol
peModule, CompilationTestData.MethodData methodData, IReadOnlyDictionary<int, string> markers, bool areLocalsZeroed)
LifetimeAnnotationAttributesVisitor.cs (2)
19
internal static string GetString(
PEModuleSymbol
module)
94
var module = ((
PEModuleSymbol
)parameter.ContainingModule).Module;
NativeIntegerAttributesVisitor.cs (1)
17
internal static string GetString(
PEModuleSymbol
module)
NullableAttributesVisitor.cs (3)
18
internal static string GetString(
PEModuleSymbol
module)
26
private readonly
PEModuleSymbol
_module;
29
private NullableAttributesVisitor(
PEModuleSymbol
module, StringBuilder builder) : base(builder)
RequiredMemberAttributesVisitor.cs (4)
15
internal static string GetString(
PEModuleSymbol
module)
38
module = ((
PEModuleSymbol
)namedType.ContainingModule).Module;
43
module = ((
PEModuleSymbol
)field.ContainingModule).Module;
48
module = ((
PEModuleSymbol
)property.ContainingModule).Module;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdDumpTest.cs (2)
131
((
PEModuleSymbol
)container.ContainingModule).Module.GetPropertyDefPropsOrThrow(property.Handle, out propertyName, out propertyAttrs);
174
((
PEModuleSymbol
)container.ContainingModule).Module.GetEventDefPropsOrThrow(evnt.Handle, out eventName, out eventAttrs, out type);
Metadata\WinMdMetadataTests.cs (2)
238
var
module = (
PEModuleSymbol
)m;
Microsoft.CodeAnalysis.Test.Utilities (1)
CommonTestBase.cs (1)
501
internal void AssertDeclaresType(
PEModuleSymbol
peModule, WellKnownType type, Accessibility expectedAccessibility)