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