Nalix.Environment API Reference
On this page
Nalix.Environment provides the Level 1 memory, binary IO, configuration, time, cryptographic randomness, packet fragmentation, and sequence counter primitives used across the Nalix ecosystem.
Memory & Binary IO (Nalix.Environment.Memory)
- Buffer Management —
IBufferLease,BufferLease,BufferPoolManager, andBufferOptions. - BufferLease — Reference-counted pooled memory slice with headroom and cryptographic zeroing (
ZeroOnDispose). - DataReader — Zero-allocation
ref structbinary reader overReadOnlySpan<byte>,ReadOnlyMemory<byte>,byte[], andbyte*. - DataWriter — Zero-allocation
ref structbinary writer supporting pooled auto-expanding and fixed-span modes.
Configuration (Nalix.Environment.Configuration)
- Configuration (ConfigurationManager & ConfigurationLoader) — Thread-safe
.iniconfiguration binding, live file watching, and validation.
Platform, Time, Random & Sequencing
- Directories — Environment- and container-aware application directory resolution (
Directories) with Unix permission hardening. - Clock — High-resolution monotonic and UTC Unix timestamp utilities (
Clock). - Timing Scope — Zero-allocation
readonly struct(TimingScope) for measuring elapsed ticks, microseconds, and milliseconds. - Random (Csprng) — Cryptographically strong random number generator backed by OS entropy (
OsCsprng). - Sequencing (SequenceCounter) — Thread-safe monotonic sequence counter and sliding-window replay validator (
Nalix.Environment.Sequencing). - Fragmentation (FragmentAssembler & FragmentHeader) — Splitting and reassembling oversized payloads (
Nalix.Environment.FragmentsandFragmentOptions).