53 references to GetModules
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler.Utilities (2)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (4)
Microsoft.CodeAnalysis.Test.Utilities (2)
Microsoft.CodeAnalysis.UnitTests (31)
MetadataReferences\AssemblyMetadataTests.cs (29)
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);
104Assert.False(copy1.GetModules()[0].IsImageOwner, "Module should not own the image");
105Assert.False(copy1.GetModules()[1].IsImageOwner, "Module should not own the image");
106Assert.False(copy1.GetModules()[2].IsImageOwner, "Module should not own the image");
108Assert.Equal(m1.Module, copy1.GetModules()[0].Module);
109Assert.Equal(m2.Module, copy1.GetModules()[1].Module);
110Assert.Equal(m3.Module, copy1.GetModules()[2].Module);
114Assert.False(copy2.GetModules()[0].IsImageOwner, "Module should not own the image");
115Assert.False(copy2.GetModules()[1].IsImageOwner, "Module should not own the image");
116Assert.False(copy2.GetModules()[2].IsImageOwner, "Module should not own the image");
118Assert.Equal(m1.Module, copy2.GetModules()[0].Module);
119Assert.Equal(m2.Module, copy2.GetModules()[1].Module);
120Assert.Equal(m3.Module, copy2.GetModules()[2].Module);
123Assert.Throws<ObjectDisposedException>(() => copy1.GetModules()[0].Module);
124Assert.Throws<ObjectDisposedException>(() => copy1.GetModules()[1].Module);
125Assert.Throws<ObjectDisposedException>(() => copy1.GetModules()[2].Module);
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());
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (2)