Class SharedRuntime

Assembly: redb.Tsak.Core.dll

Early, DI-free entry point to the shared assembly layer (Libs/shared).
Installed as the very FIRST action in Program.Main — before any redb.* type is
touched — so that framework assemblies (redb.Core/Route/providers) can live in the
shared layer instead of the application bin and still be resolved at runtime.

Reuses exactly the same primitives as :
byte-load via LoadFromStream — the DLL file is never locked, so it can be
swapped for a patch release without rebuilding the host; registration — modules (isolated ALCs)
unify their redb.* types against the single Default-ALC instance;per-assembly native resolver over runtimes/<rid>/native;version-tolerant forwarding for higher-version transitive references.
This type adds only two things on top: a logger-free early call path, and a required-set
preload whose "what failed to load" result feeds the caller's fail-fast (stage B2).

This class references ONLY BCL + (also BCL-only), so
invoking it does not force any redb.* assembly to load.

public static class SharedRuntime

Inheritance

Object→SharedRuntime

Properties

DefaultSharedPath

Default shared-layer location: <app-base>/Libs/shared.

public static string DefaultSharedPath { get; }

Methods

EnsureSharedPathResolver(string, Action<string>?)

Registers the Default ALC resolver over fullSharedPath once

public static void EnsureSharedPathResolver(string fullSharedPath, Action<string>? log = null)

GetLoadedVersion(string)

Version of a loaded assembly by simple name (tracker first, then Default ALC), or null.

public static Version? GetLoadedVersion(string simpleName)

GetNativeLibraryDirs(string)

Native lib dirs under shared/runtimes for the current RID (+ OS-only fallback).

public static List<string> GetNativeLibraryDirs(string fullSharedPath)

InstallEarly(string, IReadOnlyCollection<string>, Action<string>?)

EARLY entry point for Program.Main. Installs the resolver over

public static IReadOnlyList<string> InstallEarly(string sharedPath, IReadOnlyCollection<string> requiredNames, Action<string>? log = null)

IsLoaded(string)

True if an assembly with this simple name is already loaded/tracked.

public static bool IsLoaded(string simpleName)

LoadAndTrack(string, List<string>, Action<string>?)

Byte-loads a single DLL into the Default ALC and tracks it (file never locked). Registers

public static Assembly? LoadAndTrack(string dllPath, List<string> nativeDirs, Action<string>? log = null)