Class ModulePackage

Assembly: redb.Tsak.Core.dll

Loads a .tpkg (ZIP archive) containing manifest.json + module DLLs + per-module config.
Each package gets its own : entry point DLLs are
loaded into the package ALC (isolating module code), while companion DLLs go through
into the Default ALC (shared across packages).
Like WSO2 MI CAR files — drop into Libs/, auto-discovered and hot-reloaded.

public sealed class ModulePackage : IDisposable

Inheritance

Object→ModulePackage

Implements

Properties

Alc

The isolated ALC owning this package's entry point assemblies.

public ModuleAssemblyLoadContext? Alc { get; }

CompanionAssemblies

Companion (non-entry-point) assemblies loaded into Default ALC via Tracker.

public List<Assembly> CompanionAssemblies { get; }

ContextXml

The package's context.xml content, when the package carries one (read in Open).

public string? ContextXml { get; }

LastWriteUtc

public DateTime LastWriteUtc { get; }

LoadedAssemblies

Entry point assemblies loaded into for module discovery.

public List<Assembly> LoadedAssemblies { get; }

Manifest

public ModuleManifest Manifest { get; }

PackagePath

public string PackagePath { get; }

PackageRoot

The directory the resources were extracted under, laid out as the package is: a reference written from the package

public string? PackageRoot { get; }

ResourcesRoot

The package's directory on disk ({PackageRoot}/resources): the

public string? ResourcesRoot { get; }

XmlArtifacts

XML route artifacts (Route-XML Ф5.1), read during

public IReadOnlyList<(string Name, string Content)> XmlArtifacts { get; }

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Open(byte[], string, DateTime, string[]?, ILogger?, bool, bool, bool)

Opens a .tpkg from an in-memory buffer (the caller verified these exact bytes).

public static ModulePackage? Open(byte[] packageBytes, string tpkgPath, DateTime lastWriteUtc, string[]? probePaths = null, ILogger? logger = null, bool forceReload = false, bool collectible = false, bool isolatedCompanions = false)

Open(string, string[]?, ILogger?, bool, bool)

Opens a .tpkg file, reads manifest, loads ALL DLLs from the archive.

public static ModulePackage? Open(string tpkgPath, string[]? probePaths = null, ILogger? logger = null, bool forceReload = false, bool collectible = false)

ReadModuleConfigJson(string)

Reads the per-module config ({moduleName}.config.json) from the package as raw JSON string.

public string? ReadModuleConfigJson(string moduleName)