Class MetadataStreamList
- Namespace
- AsmResolver.PE.DotNet.Metadata
- Assembly
- AsmResolver.PE.dll
Provides an implementation of a lazy-initialized list of metadata streams present in a metadata directory.
public class MetadataStreamList : LazyList<IMetadataStream>, IList<IMetadataStream>, ICollection<IMetadataStream>, IEnumerable<IMetadataStream>, IEnumerable
- Inheritance
-
MetadataStreamList
- Implements
- Inherited Members
Constructors
MetadataStreamList(MetadataDirectory, MetadataReaderContext, MetadataStreamReaderFlags, MetadataStreamHeader[], in BinaryStreamReader)
Prepares a new lazy-initialized metadata stream list.
public MetadataStreamList(MetadataDirectory owner, MetadataReaderContext context, MetadataStreamReaderFlags streamReaderFlags, MetadataStreamHeader[] streamHeaders, in BinaryStreamReader directoryReader)
Parameters
owner
MetadataDirectoryThe owner of the metadata stream list.
context
MetadataReaderContextThe reader context.
streamReaderFlags
MetadataStreamReaderFlagsFlags describing the currently read metadata.
streamHeaders
MetadataStreamHeader[]The stream headers.
directoryReader
BinaryStreamReaderThe input stream containing the metadata directory.
Properties
Count
Gets the number of elements contained in the ICollection<T>.
public override int Count { get; }
Property Value
- int
The number of elements contained in the ICollection<T>.
Methods
Initialize()
Initializes the list. This method is called in a thread-safe manner.
protected override void Initialize()
PostInitialize()
Performs any final adjustments to the collection after all initial items were added to the underlying list.
protected override void PostInitialize()
Remarks
Upon calling this method, the IsInitialized has already been set to true
, but the
initialization lock has not been released yet. This means that any element in the list is guaranteed
to be still in its initial state. It is therefore safe to access elements, as well as adding or removing
items from Items.