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