30 references to GetModules
Microsoft.CodeAnalysis (3)
Compilation\DeterministicKeyBuilder.cs (1)
298var modules = assemblyMetadata.GetModules();
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
229foreach (var module in assembly.GetModules())
MetadataReference\AssemblyMetadata.cs (1)
410var modules = GetModules();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
69var baseline = CreateInitialBaseline(compilation0, md1.GetModules()[0], handle => default(EditAndContinueMethodDebugInformation)); 141var baseline = CreateInitialBaseline(compilation0, md1.GetModules()[0], handle => default(EditAndContinueMethodDebugInformation));
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (4)
MetadataShadowCopyProviderTests.cs (4)
146Assert.Equal(3, metadata1.GetModules().Length); 177for (int i = 0; i < metadata2.GetModules().Length; i++) 179Assert.NotSame(metadata2.GetModules()[i], modifiedMetadata3.GetModules()[i]);
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\IRuntimeEnvironment.cs (1)
87return (metadata.Kind == MetadataImageKind.Assembly) ? ((AssemblyMetadata)metadata).GetModules().AsEnumerable() : SpecializedCollections.SingletonEnumerable((ModuleMetadata)metadata);
Compilation\MetadataReferenceExtensions.cs (1)
34if (assemblyMetadata.GetModules() is { Length: > 0 } modules)
Microsoft.CodeAnalysis.UnitTests (16)
MetadataReferences\AssemblyMetadataTests.cs (14)
50Assert.Equal(1, a.GetModules().Length); 51Assert.Equal("MultiModule.dll", a.GetModules()[0].Name); 65Assert.Equal(3, a.GetModules().Length); 66Assert.Equal("MultiModule.dll", a.GetModules()[0].Name); 67Assert.Equal("mod2.netmodule", a.GetModules()[1].Name); 68Assert.Equal("mod3.netmodule", a.GetModules()[2].Name); 127Assert.NotNull(a.GetModules()[0].Module); 128Assert.NotNull(a.GetModules()[1].Module); 129Assert.NotNull(a.GetModules()[2].Module); 133Assert.Throws<ObjectDisposedException>(() => a.GetModules()[0].Module); 134Assert.Throws<ObjectDisposedException>(() => a.GetModules()[1].Module); 135Assert.Throws<ObjectDisposedException>(() => a.GetModules()[2].Module); 143Assert.Throws<BadImageFormatException>(() => metadata.GetModules()); 150Assert.Throws<BadImageFormatException>(() => metadata.GetModules());
MetadataReferences\MetadataReferenceTests.cs (2)
112Assert.Equal("CommonLanguageRuntimeLibrary", metadata.GetModules()[0].Name); 178Assert.Equal(module ? "ModuleCS00.netmodule" : "CommonLanguageRuntimeLibrary", metadata.GetModules()[0].Name);
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCommandLineParser.vb (1)
1553If metadata.GetModules()(0).Module.IsLinkedModule AndAlso
Microsoft.CodeAnalysis.Workspaces (2)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
278return assembly.GetModules();
Serialization\SerializerService_Reference.cs (1)
238modules = assemblyMetadata.GetModules();