Table of Contents

Class GuidStreamBuffer

Namespace
AsmResolver.DotNet.Builder.Metadata
Assembly
AsmResolver.DotNet.dll

Provides a mutable buffer for building up a GUID stream in a .NET portable executable.

public class GuidStreamBuffer : IMetadataStreamBuffer
Inheritance
GuidStreamBuffer
Implements
Inherited Members

Constructors

GuidStreamBuffer()

Creates a new GUID stream buffer with the default GUID stream name.

public GuidStreamBuffer()

GuidStreamBuffer(string)

Creates a new GUID stream buffer.

public GuidStreamBuffer(string name)

Parameters

name string

The name of the stream.

Properties

IsEmpty

Gets a value indicating whether the metadata stream buffer does not contain any data.

public bool IsEmpty { get; }

Property Value

bool

Name

Gets the name of the stream.

public string Name { get; }

Property Value

string

Methods

CreateStream()

Serializes the GUID stream buffer to a metadata stream.

public GuidStream CreateStream()

Returns

GuidStream

The metadata stream.

GetGuidIndex(Guid)

Gets the index to the provided GUID. If the GUID. is not present in the buffer, it will be appended to the end of the stream.

public uint GetGuidIndex(Guid guid)

Parameters

guid Guid

The GUID. to lookup or add.

Returns

uint

The index of the GUID.

ImportStream(GuidStream)

Imports the contents of a GUID stream and indexes all present GUIDs.

public void ImportStream(GuidStream stream)

Parameters

stream GuidStream

The stream to import.