105 instantiations of PEReader
BuildBoss (1)
CompilerNuGetCheckerUtil.cs (1)
387using var peReader = new PEReader(part.GetStream(FileMode.Open, FileAccess.Read));
BuildValidator (5)
CompilationDiff.cs (3)
179var peReader = new PEReader(rebuildBytes.ToImmutableArray()); 264var originalPeReader = new PEReader(_originalPortableExecutableBytes.ToImmutableArray()); 265var rebuildPeReader = new PEReader(_rebuildPortableExecutableBytes.ToImmutableArray());
Program.cs (1)
314using var originalPeReader = new PEReader(File.OpenRead(assemblyInfo.FilePath));
Util.cs (1)
19var peReader = new PEReader(stream);
Crossgen2Tasks (2)
PrepareForReadyToRunCompilation.cs (2)
160PEReader pereader = new PEReader(fs); 368using (var pereader = new PEReader(fs))
installer.tasks (1)
GenerateTestSharedFrameworkDepsFile.cs (1)
98using (var peReader = new PEReader(File.OpenRead(file)))
Microsoft.AspNetCore.App.UnitTests (7)
PackageTests.cs (2)
97using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 127using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
SharedFxTests.cs (2)
188using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 235using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
TargetingPackTests.cs (3)
85using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 119using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 201using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
Microsoft.Cci.Extensions (1)
SRMetadataPEReaderCache.cs (1)
36PEReader peReader = new PEReader(stream);
Microsoft.CodeAnalysis (9)
AssemblyUtilities.cs (3)
68using (var reader = new PEReader(FileUtilities.OpenRead(potentialDependency))) 78using (var reader = new PEReader(FileUtilities.OpenRead(assemblyPath))) 102using (var reader = new PEReader(FileUtilities.OpenRead(assemblyPath)))
AssemblyUtilitiesCore.cs (1)
31using (var reader = new PEReader(FileUtilities.OpenRead(filePath)))
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
170using var reader = new PEReader(FileUtilities.OpenRead(FullPath));
MetadataReference\AssemblyIdentityUtils.cs (1)
21using var peReader = new PEReader(stream);
MetadataReference\ModuleMetadata.cs (3)
142return new ModuleMetadata(new PEReader(peImage, size), onDispose); 172return new ModuleMetadata(new PEReader(peImage), onDispose: null); 251return new ModuleMetadata(new PEReader(peStream, options), onDispose: null);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
21using var peReader = new PEReader(stream);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (6)
2256using (var peReader = new PEReader(peStream)) 2478using (var peReader = new PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe")))) 8881var peDll = new PEReader(fsDll); 8882var pePdb = new PEReader(fsPdb); 8929using (var peReader = new PEReader(stream, PEStreamOptions.LeaveOpen)) 12304using (var peReader = new PEReader(peStream))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
Emit\CompilationEmitTests.cs (3)
656using (var peReader = new PEReader(peStream)) 674using (var reader = new PEReader(stream)) 1948using (var reader = new PEReader(image))
Emit\DeterministicTests.cs (2)
157PEReader peReader1 = new PEReader(result1.pe); 158PEReader peReader2 = new PEReader(result2.pe);
Emit\EmitMetadataTests.cs (1)
2238var peReader = new PEReader(peStream);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
34var peReader = new PEReader(verifier.EmittedAssemblyData);
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
594using (var reader = new PEReader(outStream))
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Module.cs (1)
22_reader = metadata.IsDefault ? null : new PEReader(metadata);
Microsoft.CodeAnalysis.Features (4)
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
54using (var peReader = new PEReader(assemblyStream))
Emit\CompilationOutputs.cs (2)
54using (var peReader = new PEReader(peStream, PEStreamOptions.LeaveOpen)) 109using var peReader = new PEReader(peStream);
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
89using var reader = new PEReader(fileStream);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
226using var peReader = new PEReader(stream);
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
487using var peReader = new PEReader(stream);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
38using var peReader = new PEReader(peStream);
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
366using (var peReader = new PEReader(stream))
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\IRuntimeEnvironment.cs (1)
55using (var peReader = new PEReader(Assembly))
CompilationVerifier.cs (1)
353readersByName.Add(name, new PEReader(module.Image));
InstrumentationChecker.cs (1)
323var peReader = new PEReader(peImage);
Metadata\MetadataReaderUtils.cs (2)
466using (var refPeReader = new PEReader(peStream)) 484using (var peReader = new PEReader(peImage))
Metadata\MetadataValidation.cs (2)
168var peReader1 = new PEReader(peStream1); 169var peReader2 = new PEReader(peStream2);
PDB\TestMetadataReferenceInfo.cs (1)
35_peReader = new PEReader(emitStream);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
CommandLineTests.vb (3)
3198Using peReader = New PEReader(peStream) 3399Using peReader As New PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe"))) 9716Using peReader = New PEReader(peStream)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (11)
Attributes\InternalsVisibleToAndStrongNameTests.vb (1)
1968Using reader As New PEReader(stream)
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.vb (9)
78Dim PEReader As New PEReader(peImage) 195Dim PEReader As New PEReader(peImage) 295Dim PEReader As New PEReader(peImage) 363Dim PEReader As New PEReader(peImage) 457Dim PEReader As New PEReader(peImage) 562Dim PEReader As New PEReader(peImage) 652Dim PEReader As New PEReader(peImage) 749Dim PEReader As New PEReader(peImage) 810Dim PEReader As New PEReader(peImage)
PDB\VisualBasicDeterministicBuildCompilationTests.vb (1)
50Using peReader As PEReader = New PEReader(peBlob)
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\AssemblyUtilitiesCore.cs (1)
31using (var reader = new PEReader(FileUtilities.OpenRead(filePath)))
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
21using var peReader = new PEReader(stream);
Microsoft.DotNet.Arcade.Sdk (3)
src\ExtractNgenMethodList.cs (1)
99var peReader = new PEReader(stream);
src\SetCorFlags.cs (1)
81using (var reader = new PEReader(stream))
src\Unsign.cs (1)
48using (var peReader = new PEReader(stream))
Microsoft.DotNet.Build.Tasks.Packaging (2)
GetAssemblyReferences.cs (1)
56using (PEReader peReader = new PEReader(new FileStream(assemblyItem.ItemSpec, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.Read)))
VersionUtility.cs (1)
37using (PEReader peReader = new PEReader(assemblyStream, PEStreamOptions.LeaveOpen))
Microsoft.DotNet.GenFacades (2)
ClearAssemblyReferenceVersions.cs (1)
31using (PEReader peReader = new PEReader(stream))
GenPartialFacadeSourceGenerator.cs (1)
98using (var peReader = new PEReader(new FileStream(assembly, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.Read)))
Microsoft.DotNet.PackageTesting (2)
VerifyClosure.cs (1)
431using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
VerifyTypes.cs (1)
152using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
Microsoft.DotNet.SharedFramework.Sdk (3)
src\FileUtilities.cs (1)
42using (var peReader = new PEReader(stream))
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
431using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (1)
152using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
Microsoft.DotNet.SignTool (5)
src\Configuration.cs (1)
596using (var pereader = new PEReader(stream))
src\ContentUtil.cs (3)
86using (var peReader = new PEReader(stream)) 102using (var peReader = new PEReader(stream)) 110using (var peReader = new PEReader(assemblyStream))
src\RealSignTool.cs (1)
85using (var peReader = new PEReader(stream))
PrepareTests (1)
MinimizeUtil.cs (1)
322var reader = new PEReader(stream);
Roslyn.Test.PdbUtilities (4)
Reader\PdbValidation.cs (1)
567var peReader = new PEReader(peStream);
Reader\SymReaderFactory.cs (3)
70return CreateReader(new MemoryStream(pdbImage), (peImageOpt != null) ? new PEReader(new MemoryStream(peImageOpt)) : null); 75return CreateReader(new MemoryStream(pdbImage.ToArray()), (peImageOpt.IsDefault) ? null : new PEReader(peImageOpt)); 80return CreateReader(pdbStream, (peStreamOpt != null) ? new PEReader(peStreamOpt) : null);
RunTests (1)
AssemblyScheduler.cs (1)
347using (var peReader = new PEReader(stream))
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
292using var peReader = new PEReader(writableStream);
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.Unix.cs (1)
50using (PEReader peReader = new PEReader(assemblyStream))
System.Diagnostics.StackTrace (2)
System\Diagnostics\StackTraceSymbols.cs (2)
173return new PEReader((byte*)loadedPeAddress, loadedPeSize, isLoadedImage: !isFileLayout); 179return new PEReader(peStream);
System.Reflection.Metadata (1)
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
85peReader = new PEReader((byte*)safeBuffer.DangerousGetHandle(), (int)safeBuffer.ByteLength);
System.Reflection.MetadataLoadContext (2)
System\Reflection\MetadataLoadContext.Loading.cs (1)
22PEReader peReader = new PEReader(peStream);
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
66PEReader peReader = new PEReader(peStream);
System.Windows.Forms.Design.Tests (1)
SystemDesignMetadataReader.cs (1)
23using PEReader peReader = new(fs);
210 references to PEReader
BuildBoss (1)
CompilerNuGetCheckerUtil.cs (1)
387using var peReader = new PEReader(part.GetStream(FileMode.Open, FileAccess.Read));
BuildValidator (14)
CompilationDiff.cs (5)
35PEReader AssemblyReader, 179var peReader = new PEReader(rebuildBytes.ToImmutableArray()); 264var originalPeReader = new PEReader(_originalPortableExecutableBytes.ToImmutableArray()); 265var rebuildPeReader = new PEReader(_rebuildPortableExecutableBytes.ToImmutableArray()); 379static void createDataFile(string outputFilePath, PEReader peReader, MetadataReader pdbMetadataReader)
PEReaderExtensions.cs (4)
20private PEExportTable(PEReader peReader) 94public static PEExportTable Parse(PEReader peReader) 109public static int GetOffset(this PEReader reader, int rva) 124public static PEExportTable GetExportTable(this PEReader reader)
Program.cs (1)
314using var originalPeReader = new PEReader(File.OpenRead(assemblyInfo.FilePath));
Util.cs (4)
19var peReader = new PEReader(stream); 30internal static Guid? GetMvid(PEReader peReader) 44internal static bool IsReferenceAssembly(this PEReader peReader) 86internal static bool IsReadyToRunImage(PEReader peReader)
Crossgen2Tasks (3)
PrepareForReadyToRunCompilation.cs (3)
160PEReader pereader = new PEReader(fs); 336private static bool IsNonCompositeReadyToRunImage(PEReader peReader) 368using (var pereader = new PEReader(fs))
installer.tasks (1)
GenerateTestSharedFrameworkDepsFile.cs (1)
98using (var peReader = new PEReader(File.OpenRead(file)))
Microsoft.AspNetCore.App.UnitTests (7)
PackageTests.cs (2)
97using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 127using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
SharedFxTests.cs (2)
188using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 235using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
TargetingPackTests.cs (3)
85using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 119using var peReader = new PEReader(fileStream, PEStreamOptions.Default); 201using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
Microsoft.Cci.Extensions (5)
SRMetadataPEReaderCache.cs (5)
19private Dictionary<string, (FileStream, PEReader)> _cache = null; 25_cache = new Dictionary<string, (FileStream, PEReader)>(); 29if (_cache.TryGetValue(assemblyPath, out (FileStream _, PEReader peReader) value)) 36PEReader peReader = new PEReader(stream); 48foreach ((FileStream stream, PEReader reader) in _cache.Values)
Microsoft.CodeAnalysis (13)
AssemblyUtilities.cs (3)
68using (var reader = new PEReader(FileUtilities.OpenRead(potentialDependency))) 78using (var reader = new PEReader(FileUtilities.OpenRead(assemblyPath))) 102using (var reader = new PEReader(FileUtilities.OpenRead(assemblyPath)))
AssemblyUtilitiesCore.cs (1)
31using (var reader = new PEReader(FileUtilities.OpenRead(filePath)))
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
170using var reader = new PEReader(FileUtilities.OpenRead(FullPath));
MetadataReader\PEModule.cs (5)
41private readonly PEReader _peReaderOpt; 145internal PEModule(ModuleMetadata owner, PEReader peReader, IntPtr metadataOpt, int metadataSizeOpt, bool includeEmbeddedInteropTypes, bool ignoreAssemblyRefs) 169private readonly PEReader _peReader; 171public PEHashProvider(PEReader peReader) 207internal PEReader PEReaderOpt
MetadataReference\AssemblyIdentityUtils.cs (1)
21using var peReader = new PEReader(stream);
MetadataReference\ModuleMetadata.cs (1)
32private ModuleMetadata(PEReader peReader, Action? onDispose)
PEWriter\MetadataWriter.PortablePdb.cs (1)
968var peReader = pair.AssemblySymbol.GetISymbol() is IAssemblySymbol assemblySymbol
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
21using var peReader = new PEReader(stream);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (6)
2256using (var peReader = new PEReader(peStream)) 2478using (var peReader = new PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe")))) 8881var peDll = new PEReader(fsDll); 8882var pePdb = new PEReader(fsPdb); 8929using (var peReader = new PEReader(stream, PEStreamOptions.LeaveOpen)) 12304using (var peReader = new PEReader(peStream))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
PdbSourceDocument\TestSourceLinkService.cs (1)
23public Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (22)
CodeGen\CodeGenAsyncIteratorTests.cs (1)
4213var peReader = new PEReader(comp.EmitToArray());
CodeGen\CodeGenAsyncMainTests.cs (1)
719using var reader = new PEReader(image);
Emit\CompilationEmitTests.cs (4)
656using (var peReader = new PEReader(peStream)) 674using (var reader = new PEReader(stream)) 1948using (var reader = new PEReader(image)) 2621using (var peReader = new PEReader(stream.ToImmutable()))
Emit\DeterministicTests.cs (2)
157PEReader peReader1 = new PEReader(result1.pe); 158PEReader peReader2 = new PEReader(result2.pe);
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (13)
78var peReader = new PEReader(peImage); 222var peReader = new PEReader(peImage); 342var peReader = new PEReader(peImage); 436var peReader = new PEReader(peImage); 493var peReader = new PEReader(peImage); 532var peReader = new PEReader(peImage); 563var peReader = new PEReader(peImage); 603var peReader = new PEReader(peImage); 671var peReader = new PEReader(peImage); 752var peReader = new PEReader(peImage); 833var peReader = new PEReader(peImage); 927var peReader = new PEReader(peImage); 960var peReader = new PEReader(peImage);
Emit\EmitMetadataTests.cs (1)
2238var peReader = new PEReader(peStream);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (9)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
70using (var peReader = new PEReader(peBlob))
PDB\PDBEmbeddedSourceTests.cs (1)
112using (var peReader = new PEReader(peBlob))
PDB\PDBSourceLinkTests.cs (1)
85using (var peReader = new PEReader(peBlob))
PDB\PDBTests.cs (2)
660var peReader = new PEReader(c.EmitToArray(debugEntryPoint: f.GetPublicSymbol())); 683var peReader = new PEReader(c.EmitToArray(debugEntryPoint: f.GetPublicSymbol()));
PDB\PortablePdbTests.cs (4)
47using (var peReader = new PEReader(peBlob)) 173using (var peReader = new PEReader(peBlob)) 233using (var peReader = new PEReader(peBlob)) 346using (var peReader = new PEReader(peBlob))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_Nullable.cs (1)
5392using (var reader = new PEReader(image))
Attributes\AttributeTests_WellKnownAttributes.cs (1)
34var peReader = new PEReader(verifier.EmittedAssemblyData);
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
594using (var reader = new PEReader(outStream))
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Module.cs (1)
14private readonly PEReader? _reader;
Microsoft.CodeAnalysis.Features (8)
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
54using (var peReader = new PEReader(assemblyStream))
Emit\CompilationOutputs.cs (2)
54using (var peReader = new PEReader(peStream, PEStreamOptions.LeaveOpen)) 109using var peReader = new PEReader(peStream);
PdbSourceDocument\DocumentDebugInfoReader.cs (2)
22private readonly PEReader _peReader; 27public DocumentDebugInfoReader(PEReader peReader, MetadataReaderProvider pdbReaderProvider)
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
89using var reader = new PEReader(fileStream);
PdbSourceDocument\ISourceLinkService.cs (1)
15Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken);
PdbSourceDocument\PdbFileLocatorService.cs (1)
39var peReader = new PEReader(dllStream);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
226using var peReader = new PEReader(stream);
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
487using var peReader = new PEReader(stream);
Microsoft.CodeAnalysis.Rebuild (3)
CompilationOptionsReader.cs (2)
44public PEReader PeReader { get; } 52public CompilationOptionsReader(ILogger logger, MetadataReader pdbReader, PEReader peReader)
Extensions.cs (1)
24public static MetadataReader? GetEmbeddedPdbMetadataReader(this PEReader peReader)
Microsoft.CodeAnalysis.Rebuild.UnitTests (7)
CompilationOptionsReaderTests.cs (1)
33var originalReader = new PEReader(peBytes);
CSharpRebuildTests.cs (1)
28var originalPeReader = new PEReader(originalBytes);
RoundTripUtil.cs (5)
38using var peReader = new PEReader(peStream); 63private record EmitInfo(ImmutableArray<byte> PEBytes, PEReader PEReader, ImmutableArray<byte> PdbBytes, MetadataReader PdbReader) : IDisposable 112using var rebuildReader = new PEReader(rebuildBytes); 141var originalReader = new PEReader(originalBytes); 152var originalReader = new PEReader(originalBytes);
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
366using (var peReader = new PEReader(stream))
Microsoft.CodeAnalysis.Test.Utilities (17)
Compilation\IRuntimeEnvironment.cs (1)
55using (var peReader = new PEReader(Assembly))
CompilationVerifier.cs (9)
305private readonly Dictionary<string, PEReader> _readersByName; 307internal Resolver(Dictionary<string, PEReader> readersByName) 312public PEReader ResolveAssembly(AssemblyName assemblyName) 317public PEReader ResolveModule(AssemblyName referencingAssembly, string fileName) 322public PEReader Resolve(string simpleName) 324if (_readersByName.TryGetValue(simpleName, out var reader)) 340var readersByName = new Dictionary<string, PEReader>(StringComparer.OrdinalIgnoreCase); 370var mainModuleReader = resolver.Resolve(_allModuleData[0].SimpleName); 394static (bool, string) verify(ILVerify.Verifier verifier, string corlibName, PEReader mainModule)
InstrumentationChecker.cs (1)
323var peReader = new PEReader(peImage);
Metadata\DynamicAnalysisDataReader.cs (1)
142public static DynamicAnalysisDataReader TryCreateFromPE(PEReader peReader, string resourceName)
Metadata\MetadataReaderUtils.cs (2)
466using (var refPeReader = new PEReader(peStream)) 484using (var peReader = new PEReader(peImage))
Metadata\MetadataValidation.cs (2)
168var peReader1 = new PEReader(peStream1); 169var peReader2 = new PEReader(peStream2);
PDB\TestMetadataReferenceInfo.cs (1)
26private readonly PEReader _peReader;
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
PDB\VisualBasicDeterministicBuildCompilationTests.vb (1)
50Using peReader As PEReader = New PEReader(peBlob)
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\AssemblyUtilitiesCore.cs (1)
31using (var reader = new PEReader(FileUtilities.OpenRead(filePath)))
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
21using var peReader = new PEReader(stream);
Microsoft.DotNet.Arcade.Sdk (3)
src\ExtractNgenMethodList.cs (1)
99var peReader = new PEReader(stream);
src\SetCorFlags.cs (1)
81using (var reader = new PEReader(stream))
src\Unsign.cs (1)
48using (var peReader = new PEReader(stream))
Microsoft.DotNet.Build.Tasks.Packaging (2)
GetAssemblyReferences.cs (1)
56using (PEReader peReader = new PEReader(new FileStream(assemblyItem.ItemSpec, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.Read)))
VersionUtility.cs (1)
37using (PEReader peReader = new PEReader(assemblyStream, PEStreamOptions.LeaveOpen))
Microsoft.DotNet.GenFacades (2)
ClearAssemblyReferenceVersions.cs (1)
31using (PEReader peReader = new PEReader(stream))
GenPartialFacadeSourceGenerator.cs (1)
98using (var peReader = new PEReader(new FileStream(assembly, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.Read)))
Microsoft.DotNet.PackageTesting (2)
VerifyClosure.cs (1)
431using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
VerifyTypes.cs (1)
152using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
Microsoft.DotNet.SharedFramework.Sdk (3)
src\FileUtilities.cs (1)
42using (var peReader = new PEReader(stream))
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
431using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (1)
152using (PEReader peReader = new PEReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
Microsoft.DotNet.SignTool (6)
src\Configuration.cs (1)
596using (var pereader = new PEReader(stream))
src\ContentUtil.cs (4)
64public static bool IsPublicSigned(PEReader peReader) 86using (var peReader = new PEReader(stream)) 102using (var peReader = new PEReader(stream)) 110using (var peReader = new PEReader(assemblyStream))
src\RealSignTool.cs (1)
85using (var peReader = new PEReader(stream))
Microsoft.VisualStudio.LanguageServices (1)
PdbSourceDocument\AbstractSourceLinkService.cs (1)
18public async Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.DevKit (1)
src\VisualStudio\Core\Def\PdbSourceDocument\AbstractSourceLinkService.cs (1)
18public async Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken)
PrepareTests (1)
MinimizeUtil.cs (1)
322var reader = new PEReader(stream);
Roslyn.Test.PdbUtilities (2)
Reader\PdbValidation.cs (1)
567var peReader = new PEReader(peStream);
Reader\SymReaderFactory.cs (1)
83public static ISymUnmanagedReader5 CreateReader(Stream pdbStream, PEReader peReaderOpt)
RunTests (1)
AssemblyScheduler.cs (1)
347using (var peReader = new PEReader(stream))
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
292using var peReader = new PEReader(writableStream);
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.Unix.cs (1)
50using (PEReader peReader = new PEReader(assemblyStream))
System.Diagnostics.StackTrace (2)
System\Diagnostics\StackTraceSymbols.cs (2)
169private static unsafe PEReader? TryGetPEReader(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout) 187using (var peReader = TryGetPEReader(assemblyPath, loadedPeAddress, loadedPeSize, isFileLayout))
System.Reflection.Metadata (43)
System\Reflection\Metadata\MetadataReader.cs (2)
49/// Use <see cref="PEReaderExtensions.GetMetadataReader(PortableExecutable.PEReader, MetadataReaderOptions)"/> to obtain 62/// Use <see cref="PEReaderExtensions.GetMetadataReader(PortableExecutable.PEReader, MetadataReaderOptions, MetadataStringDecoder)"/> to obtain
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
67PEReader? peReader = null;
System\Reflection\Metadata\PEReaderExtensions.cs (10)
24public static MethodBodyBlock GetMethodBody(this PEReader peReader, int relativeVirtualAddress) 42/// Gets a <see cref="MetadataReader"/> from a <see cref="PEReader"/>. 45/// The caller must keep the <see cref="PEReader"/> alive and undisposed throughout the lifetime of the metadata reader. 50public static MetadataReader GetMetadataReader(this PEReader peReader) 56/// Gets a <see cref="MetadataReader"/> from a <see cref="PEReader"/>. 59/// The caller must keep the <see cref="PEReader"/> alive and undisposed throughout the lifetime of the metadata reader. 64public static MetadataReader GetMetadataReader(this PEReader peReader, MetadataReaderOptions options) 70/// Gets a <see cref="MetadataReader"/> from a <see cref="PEReader"/>. 73/// The caller must keep the <see cref="PEReader"/> undisposed throughout the lifetime of the metadata reader. 79public static unsafe MetadataReader GetMetadataReader(this PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder? utf8Decoder)
System\Reflection\PortableExecutable\PEReader.cs (23)
52/// The memory is owned by the caller and not released on disposal of the <see cref="PEReader"/>. 53/// The caller is responsible for keeping the memory alive and unmodified throughout the lifetime of the <see cref="PEReader"/>. 54/// The content of the image is not read during the construction of the <see cref="PEReader"/> 70/// The memory is owned by the caller and not released on disposal of the <see cref="PEReader"/>. 71/// The caller is responsible for keeping the memory alive and unmodified throughout the lifetime of the <see cref="PEReader"/>. 72/// The content of the image is not read during the construction of the <see cref="PEReader"/> 96/// Ownership of the stream is transferred to the <see cref="PEReader"/> upon successful validation of constructor arguments. It will be 97/// disposed by the <see cref="PEReader"/> and the caller must not manipulate it. 111/// Unless <see cref="PEStreamOptions.LeaveOpen"/> is specified, ownership of the stream is transferred to the <see cref="PEReader"/> 112/// upon successful argument validation. It will be disposed by the <see cref="PEReader"/> and the caller must not manipulate it. 115/// is read from the stream during the construction of the <see cref="PEReader"/>. Furthermore, the stream must not be manipulated 116/// by caller while the <see cref="PEReader"/> is alive and undisposed. 118/// If <see cref="PEStreamOptions.PrefetchMetadata"/> or <see cref="PEStreamOptions.PrefetchEntireImage"/>, the <see cref="PEReader"/> 120/// specified, the caller retains full ownership of the stream and is assured that it will not be manipulated by the <see cref="PEReader"/> 140/// Unless <see cref="PEStreamOptions.LeaveOpen"/> is specified, ownership of the stream is transferred to the <see cref="PEReader"/> 141/// upon successful argument validation. It will be disposed by the <see cref="PEReader"/> and the caller must not manipulate it. 144/// is read from the stream during the construction of the <see cref="PEReader"/>. Furthermore, the stream must not be manipulated 145/// by caller while the <see cref="PEReader"/> is alive and undisposed. 147/// If <see cref="PEStreamOptions.PrefetchMetadata"/> or <see cref="PEStreamOptions.PrefetchEntireImage"/>, the <see cref="PEReader"/> 149/// specified, the caller retains full ownership of the stream and is assured that it will not be manipulated by the <see cref="PEReader"/> 227/// The content of the image is not read during the construction of the <see cref="PEReader"/> 245/// It is not safe to call <see cref="Dispose"/> in parallel with any other operation on the <see cref="PEReader"/> 436/// Returns false if the <see cref="PEReader"/> is constructed from a stream and only part of it is prefetched into memory.
System\Reflection\PortableExecutable\PEStreamOptions.cs (6)
10/// By default the stream is disposed when <see cref="PEReader"/> is disposed and sections of the PE image are read lazily. 15/// Keep the stream open when the <see cref="PEReader"/> is disposed. 23/// Reading from other sections of the file is not allowed (<see cref="InvalidOperationException"/> is thrown by the <see cref="PEReader"/>). 24/// The underlying file may be closed and even deleted after <see cref="PEReader"/> is constructed. 26/// <see cref="PEReader"/> closes the stream automatically by the time the constructor returns unless <see cref="LeaveOpen"/> is specified. 34/// <see cref="PEReader"/> closes the stream automatically by the time the constructor returns unless <see cref="LeaveOpen"/> is specified.
System\Reflection\Throw.cs (1)
263throw new ObjectDisposedException(nameof(PortableExecutable.PEReader));
System.Reflection.MetadataLoadContext (10)
System\Reflection\MetadataLoadContext.Loading.cs (2)
22PEReader peReader = new PEReader(peStream); 23PEReader? peReaderToDispose = peReader; // Ensure peReader is disposed immediately if we throw an exception before we're done.
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.cs (1)
19internal EcmaAssembly(MetadataLoadContext loader, PEReader peReader, MetadataReader reader, string location)
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
66PEReader peReader = new PEReader(peStream);
System\Reflection\TypeLoading\General\Ecma\GuardedPEReader.cs (3)
23private readonly PEReader _peReader; 27public GuardedPEReader(MetadataLoadContext loader, PEReader peReader, MetadataReader reader) 38public PEReader PEReader { get { _loader.DisposeCheck(); return _peReader; } }
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (2)
25internal EcmaModule(EcmaAssembly assembly, string fullyQualifiedName, PEReader peReader, MetadataReader reader) 133internal PEReader PEReader => _guardedPEReader.PEReader;
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.ManifestResources.cs (1)
32PEReader pe = _guardedPEReader.PEReader;
System.Windows.Forms.Design.Tests (1)
SystemDesignMetadataReader.cs (1)
23using PEReader peReader = new(fs);