23 references to CreateFromStream
Microsoft.CodeAnalysis (2)
MetadataReference\AssemblyMetadata.cs (1)
140return Create(ModuleMetadata.CreateFromStream(peStream, leaveOpen));
MetadataReference\ModuleMetadata.cs (1)
269return CreateFromStream(StandardFileSystem.Instance.OpenFileWithNormalizedException(path, FileMode.Open, FileAccess.Read, FileShare.Read));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\CodeGenTupleTest.cs (2)
22773using (ModuleMetadata block = ModuleMetadata.CreateFromStream(comp.EmitToStream())) 22813using (ModuleMetadata block = ModuleMetadata.CreateFromStream(comp.EmitToStream()))
Emit\CompilationEmitTests.cs (4)
3469var metadataReader = ModuleMetadata.CreateFromStream(compilation.EmitToStream()).MetadataReader; 4213using (ModuleMetadata block = ModuleMetadata.CreateFromStream(compilation.EmitToStream())) 4621var metadataRef = ModuleMetadata.CreateFromStream(comp.EmitToStream()).GetReference(); 5070var peReader = ModuleMetadata.CreateFromStream(compilation.EmitToStream()).Module.GetMetadataReader();
Emit\DeterministicTests.cs (1)
345using (var block = ModuleMetadata.CreateFromStream(stream))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Attributes\AttributeTests_Assembly.cs (1)
944using (var metadata = ModuleMetadata.CreateFromStream(stream))
Attributes\AttributeTests_WellKnownAttributes.cs (2)
3144using (var metadata = ModuleMetadata.CreateFromStream(image)) 10696var metadata = ModuleMetadata.CreateFromStream(comp.EmitToStream());
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
1533using (var metadata = ModuleMetadata.CreateFromStream(moduleContents))
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
MetadataUtilities.cs (1)
479using (var metadata = ModuleMetadata.CreateFromStream(new MemoryStream(assembly)))
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
504return ModuleMetadata.CreateFromStream(stream, leaveOpen: false);
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
47using (var metadata = ModuleMetadata.CreateFromStream(moduleContents, leaveOpen: true))
Microsoft.CodeAnalysis.UnitTests (6)
MetadataReferences\ModuleMetadataTests.cs (6)
109Assert.Throws<ArgumentNullException>(() => ModuleMetadata.CreateFromStream(peStream: null)); 110Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromStream(new TestStream(canRead: false, canSeek: true))); 111Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromStream(new TestStream(canRead: true, canSeek: false))); 189var metadata = ModuleMetadata.CreateFromStream(stream, leaveOpen: false); 244var metadata = ModuleMetadata.CreateFromStream(stream, leaveOpen: true); 375var metadata = ModuleMetadata.CreateFromStream(stream, leaveOpen: false);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Attributes\InternalsVisibleToAndStrongNameTests.vb (1)
1415Using metadata = ModuleMetadata.CreateFromStream(moduleContents)