12 references to CreateFromStream
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RazorReferenceManager.cs (1)
77var moduleMetadata = ModuleMetadata.CreateFromStream(stream, PEStreamOptions.PrefetchMetadata);
Microsoft.CodeAnalysis (5)
MetadataReference\AssemblyMetadata.cs (1)
151return Create(ModuleMetadata.CreateFromStream(peStream, options));
MetadataReference\MetadataReference.cs (3)
186/// It is recommended to use <see cref="AssemblyMetadata.CreateFromStream(Stream, PEStreamOptions)"/> or <see cref="ModuleMetadata.CreateFromStream(Stream, PEStreamOptions)"/> 208MetadataImageKind.Module => ModuleMetadata.CreateFromStream(peStream, PEStreamOptions.PrefetchEntireImage), 272var module = ModuleMetadata.CreateFromStream(peStream, options);
MetadataReference\ModuleMetadata.cs (1)
187return CreateFromStream(peStream, leaveOpen ? PEStreamOptions.LeaveOpen : PEStreamOptions.Default);
Microsoft.CodeAnalysis.UnitTests (5)
MetadataReferences\ModuleMetadataTests.cs (5)
170ModuleMetadata.CreateFromStream(new MemoryStream(), PEStreamOptions.Default); 171Assert.Throws<BadImageFormatException>(() => ModuleMetadata.CreateFromStream(new MemoryStream(), PEStreamOptions.PrefetchMetadata)); 172Assert.Throws<BadImageFormatException>(() => ModuleMetadata.CreateFromStream(new MemoryStream(), PEStreamOptions.PrefetchMetadata | PEStreamOptions.PrefetchEntireImage)); 308var metadata = ModuleMetadata.CreateFromStream(stream, options); 339var metadata = ModuleMetadata.CreateFromStream(stream, options | PEStreamOptions.LeaveOpen);
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\MetadataCache.cs (1)
34return ModuleMetadata.CreateFromStream(fileStream, options);