using System.Threading; using SQLitePCL; namespace Mrleo1nid.SwarmAssistent; /// /// SwarmUI loads extensions in an isolated AssemblyLoadContext — Microsoft.Data.Sqlite /// does not auto-init native SQLite there. Call once before the first connection. /// internal static class AssistentSqliteBootstrap { static int _ready; internal static void EnsureInitialized() { if (Interlocked.CompareExchange(ref _ready, 1, 0) != 0) { return; } Batteries_V2.Init(); } }