Nalix.Framework API Reference
On this page
Nalix.Framework provides the Level 2 runtime services for the Nalix ecosystem, including Native AOT-safe dependency injection, background worker and recurring job management, 64-bit Snowflake identifiers, and pooled memory/object managers.
Dependency Injection & Diagnostics (Nalix.Framework.Injection)
- Instance Manager (DI) — Lock-free service registry with 2-slot MRU
[ThreadStatic]L1 caching, compile-time[Injectable]activators, greedy constructor injection (CreateInstanceWithInjection), and post-startupLockdown(). - SingletonBase<T> — Thread-safe generic singleton base backed by
Lazy<T>and compile-timeSingletonActivatorCachefactories (ReportRegistry,PacketRegistryFactory, etc.). ReportRegistry&ReportExtensions(Nalix.Framework,Nalix.Framework.Extensions) — Thread-safe diagnostic report registry (ReportRegistry.Instance.Register<T>(CoreTelemetryTarget, instance),Get<T>(key),GenerateReport(),WriteReportData(Utf8JsonWriter), andIReportable.ToJsonUtf8()/ToJsonString()).DiagnosticsEvents&DiagnosticListenerFactory(Nalix.Environment,Nalix.Codec,Nalix.Framework,Nalix.Network,Nalix.Runtime) — Per-assemblyDiagnosticListenersources ("Environment","Codec","Framework","Network","Runtime") emitting structuredDiagnosticLog(Tag, Message, Exception)payloads (with a browser-safe No-Op adapter on WebAssembly).
Background Tasks & Identifiers
- Task Manager — Multi-gate background worker and recurring job scheduler (
ITaskManager) with CPU-aware dynamic concurrency scaling (TaskManagerOptions). - WorkerOptions — Per-worker priority, group concurrency limits, retention, OS thread priority, and CPU core affinity.
- RecurringOptions — Non-reentrant execution, startup jitter, per-run timeout, and exponential backoff settings for recurring jobs.
- Snowflake — 64-bit sortable identifier (
Type+ 32-bit Unix secondsValue+ 14-bitSequence+ 10-bitMachineId) andSnowflakeOptions.
Memory & Object Pooling (Nalix.Framework.Memory)
- Object Pooling (ObjectPoolManager) — Type-indexed object pool manager (
IObjectPoolManager),ObjectPoolOptions, health checks, background trimming, and GC sentinel leak detection. - Typed Object Pools (TypedObjectPool
) — Type-specific pool facade eliminating generic dispatch overhead on hot paths. - Object Map (ObjectMap<TKey, TValue>) — Pooled thread-safe dictionary (
IObjectMap<TKey, TValue>) backed byConcurrentDictionary<TKey, TValue>andObjectPoolManager.Shared. - Buffer Management (BufferPoolManager & BufferOptions) — Byte array pool manager (
IBufferPoolManager) with rent/return telemetry andBufferSentinelleak tracking.