Table of Contents

Libraries

The CodeLogic Libraries suite is twelve independent NuGet packages. Each is a CodeLogic ILibrary — load the ones you need, configure them through their JSON files, and use them from your application or from other libraries after StartAsync().

Databases
Communication
Storage
Security
Networking & Game
Ops & Tooling
Utilities

Shared conventions

The libraries follow a handful of consistent patterns, so once you've used one the rest feel familiar.

Loading & access

await Libraries.LoadAsync<CL.MySQL2.MySQL2Library>();   // register before ConfigureAsync()
await CodeLogic.ConfigureAsync();
await CodeLogic.StartAsync();

var mysql = Libraries.Get<CL.MySQL2.MySQL2Library>();   // resolve after StartAsync()

Result-based APIs

Most operations return Result / Result<T> rather than throwing for expected failures:

var result = await repo.GetByIdAsync(42);
if (result.IsSuccess)
    Use(result.Value);
else
    log.Warn(result.Error?.Message);

Configuration files

Each library auto-generates its JSON config on first run under its own config directory (e.g. …/Libraries/CL.MySQL2/config.mysql.json). Defaults are written if the file is missing, so first boot always succeeds and you tune from there.

Health checks

Every library implements HealthCheckAsync():

var status = await mysql.HealthCheckAsync();
// status.Status : Healthy | Degraded | Unhealthy
// status.Message, status.Data (structured metrics)

The database trio

CL.MySQL2, CL.PostgreSQL, and CL.SQLite share the same shape — GetRepository<T>() for CRUD and a fluent query builder (Query<T>() on MySQL2/PostgreSQL, GetQueryBuilder<T>() on SQLite) that translates LINQ-style expressions to SQL, plus attribute-driven table sync.

See the API Reference for the full generated type and member listing.