Class MetadataReaderContext
- Namespace
- AsmResolver.PE.DotNet.Metadata
- Assembly
- AsmResolver.PE.dll
Provides a context for a .NET metadata directory reader.
public class MetadataReaderContext : IErrorListener
- Inheritance
-
MetadataReaderContext
- Implements
- Inherited Members
Constructors
MetadataReaderContext(ISegmentReferenceFactory)
Constructs a new metadata reader context.
public MetadataReaderContext(ISegmentReferenceFactory factory)
Parameters
factoryISegmentReferenceFactoryThe factory object responsible for translating RVAs to references.
MetadataReaderContext(ISegmentReferenceFactory, IErrorListener, IMetadataStreamReader)
Constructs a new metadata reader context.
public MetadataReaderContext(ISegmentReferenceFactory referenceFactory, IErrorListener errorListener, IMetadataStreamReader metadataStreamReader)
Parameters
referenceFactoryISegmentReferenceFactoryThe factory object responsible for translating RVAs to references.
errorListenerIErrorListenerThe object responsible for collecting any errors during the parsing.
metadataStreamReaderIMetadataStreamReaderThe object responsible for reading metadata streams in the .NET data directory.
Properties
ErrorListener
Gets the object responsible for collecting any errors during the parsing.
public IErrorListener ErrorListener { get; }
Property Value
MetadataStreamReader
Gets the object responsible for reading metadata streams in the .NET data directory.
public IMetadataStreamReader MetadataStreamReader { get; }
Property Value
ReferenceFactory
Gets the factory responsible for translating RVAs to references.
public ISegmentReferenceFactory ReferenceFactory { get; }
Property Value
Methods
FromReaderContext(PEReaderContext)
Constructs a metadata reader context from a PE reader context.
public static MetadataReaderContext FromReaderContext(PEReaderContext context)
Parameters
contextPEReaderContextThe context to transform.
Returns
- MetadataReaderContext
The constructed context.
MarkAsFatal()
Marks the process to have failed.
public void MarkAsFatal()
RegisterException(Exception)
Registers an error.
public void RegisterException(Exception exception)
Parameters
exceptionExceptionThe error.