<PackageReference Include="Castle.Core" Version="5.2.1" />

ModuleScope

public class ModuleScope
public static readonly string DEFAULT_ASSEMBLY_NAME

The default assembly (simple) name used for the assemblies generated by a ModuleScope instance.

public static readonly string DEFAULT_FILE_NAME

The default file name used when the assembly is saved using DEFAULT_FILE_NAME.

public string StrongNamedModuleDirectory { get; }

Gets the directory where the strongly named module generated by this scope will be saved, or null if the current directory is used.

public string StrongNamedModuleName { get; }

Gets the file name of the strongly named module generated by this scope.

public string WeakNamedModuleDirectory { get; }

Gets the directory where the weakly named module generated by this scope will be saved, or null if the current directory is used.

public string WeakNamedModuleName { get; }

Gets the file name of the weakly named module generated by this scope.

public ModuleScope()

Initializes a new instance of the ModuleScope class; assemblies created by this instance will not be saved.

public ModuleScope(bool savePhysicalAssembly)

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved.

public ModuleScope(bool savePhysicalAssembly, bool disableSignedModule)

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved.

public ModuleScope(bool savePhysicalAssembly, bool disableSignedModule, string strongAssemblyName, string strongModulePath, string weakAssemblyName, string weakModulePath)

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved and what simple names are to be assigned to them.

public static byte[] GetKeyPair()

Gets the key pair used to sign the strong-named assembly generated by this ModuleScope.

public void LoadAssemblyIntoCache(Assembly assembly)

Loads the generated types from the given assembly into this ModuleScope's cache.

public string SaveAssembly()

Saves the generated assembly with the name and directory information given when this ModuleScope instance was created (or with the DEFAULT_FILE_NAME and current directory if none was given).

public string SaveAssembly(bool strongNamed)

Saves the specified generated assembly with the name and directory information given when this ModuleScope instance was created (or with the DEFAULT_FILE_NAME and current directory if none was given).