Table of Contents

Class DotNetDirectoryFactory

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

Provides a default implementation for the IDotNetDirectoryFactory interface.

public class DotNetDirectoryFactory : IDotNetDirectoryFactory
Inheritance
DotNetDirectoryFactory
Implements
Inherited Members

Constructors

DotNetDirectoryFactory()

Creates a new instance of the DotNetDirectoryFactory claDiagnosticBag//

public DotNetDirectoryFactory()

DotNetDirectoryFactory(MetadataBuilderFlags)

Creates a new instance of the DotNetDirectoryFactory class.

public DotNetDirectoryFactory(MetadataBuilderFlags metadataBuilderFlags)

Parameters

metadataBuilderFlags MetadataBuilderFlags

The flags defining the behaviour of the .NET metadata directory builder regarding the construction of the .NET metadata directory.

Properties

MetadataBuilderFlags

Gets or sets the flags defining the behaviour of the .NET metadata directory builder regarding the construction of the .NET metadata directory.

public MetadataBuilderFlags MetadataBuilderFlags { get; set; }

Property Value

MetadataBuilderFlags

MethodBodySerializer

Gets or sets the method body serializer to use for constructing method bodies.

public IMethodBodySerializer MethodBodySerializer { get; set; }

Property Value

IMethodBodySerializer

StrongNamePrivateKey

Gets or sets the strong-name private key to use for signing the module.

public StrongNamePrivateKey? StrongNamePrivateKey { get; set; }

Property Value

StrongNamePrivateKey

Methods

CreateDotNetDirectory(ModuleDefinition, INativeSymbolsProvider, IErrorListener)

Constructs a .NET data directory based on the provided .NET module.

public virtual DotNetDirectoryBuildResult CreateDotNetDirectory(ModuleDefinition module, INativeSymbolsProvider symbolsProvider, IErrorListener errorListener)

Parameters

module ModuleDefinition

The module to serialize to a .NET data directory.

symbolsProvider INativeSymbolsProvider

The object responsible for providing references to native symbols.

errorListener IErrorListener

The listener that is used to collect all diagnostic information during the building process.

Returns

DotNetDirectoryBuildResult

The serialized data directory.

Exceptions

MetadataBuilderException

Occurs when the metadata builder encounters an error.