Namespace FishMMO.Shared
Classes
- ArrayExtensions
Extension methods for populating jagged arrays with new instances of type T. Useful for initializing grids, voxels, or nested data structures in FishMMO.
- Authentication
Centralized authentication and naming rules shared across all projects.
- ByteArrayExtensions
Extension methods for byte arrays, providing high-performance comparison functionality.
- ByteExtensions
Provides deterministic byte utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
- CircularBuffer<T>
A circular doubly linked list designed for high-performance addition/removal of reference types. All public members are thread-safe.
- CircularBuffer<T>.Node
A node in the circular doubly-linked list. Exposed publicly so callers can hold a reference for O(1) removal via Remove(Node?).
- Configuration
Thread-safe key-value configuration store with file I/O, environment-variable override support, and typed accessors. Each instance manages its own lock so that multiple Configuration objects can be used independently without cross-instance contention.
- CryptographicOperationsCompat
Cross-platform replacement for ZeroMemory(Span<byte>) that works on Unity IL2CPP, Mono, and .NET Core/.NET 8+.
- DictionaryCompression
Extension methods for compressing and decompressing dictionaries using GZip. Uses manual binary serialization for security and performance.
- DirectoryExtensions
Extension methods for System.IO.Directory operations, including recursive file discovery.
- DoubleExtensions
Extension methods for double-precision floating-point numbers.
- EnumExtensions
Extension methods and caching utilities for working with enums.
- FastActivator<TResult>
A faster alternative to Activator.CreateInstance
The 17 constructor overloads (0 through 16 arguments) are intentionally copy-pasted rather than unified behind IReadOnlyList<object?>. This eliminates boxing/allocation of value-type arguments and avoids the per-call array or list allocation that a params-style API would require, keeping construction as close to raw "new" as possible.
- FloatExtensions
Extension methods for float values, providing absolute, clamping, min/max, and digit counting functionality.
- IListExtensions
Extension methods for IList, providing high-performance randomization and shuffling utilities. Utilizes Thread-Local Storage (TLS) to ensure high concurrency without lock contention.
- IntBitExtensions
Extension methods for high-performance bitwise flag manipulation on integers. Supports both raw bit indices and generic Enum-based bit positions.
- IntExtensions
Provides deterministic integer utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
- LongBitExtensions
Extension methods for high-performance bitwise flag manipulation on 64-bit integers (long). Supports both raw bit indices and generic Enum-based bit positions (0-63).
- LongExtensions
Extension methods for 64-bit integers, providing deterministic absolute, clamping, digit counting, extraction, and scaling functionality.
- MathHelper
Common mathematical constants and utilities. Provides both double-precision and single-precision equivalents for frequently used values not available in .NET Standard 2.1.
- ProcessExtensions
Extension methods for System.Diagnostics.Process, providing asynchronous integration.
- RandomExtensions
Extension methods for System.Random, providing support for high-precision 64-bit random generation.
- RefWrapper<T>
A reference-type wrapper for value types or generics. Allows value types to be passed and modified by reference across different systems.
- SByteExtensions
Provides deterministic signed byte utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
- SetOnce<T>
Thread-safe wrapper that allows a value to be set only once. Optimized for lock-free reads after the initial assignment. Uses both a volatile isSet guard and the lock's implicit memory barrier to ensure all threads see the written value on weak memory-model architectures (ARM, ARM64).
- ShortExtensions
Provides deterministic 16-bit signed integer (short) utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
- StringCompression
Provides high-performance utility methods for compressing strings using GZip and Base64. Optimized for memory usage and high-concurrency environments.
- StringExtensions
Extension methods for string, including high-performance deterministic hash code generation.
- TypeExtensions
Extension methods for System.Type, providing high-performance instance creation via compiled expression trees and thread-safe delegate caching.
- UIntExtensions
Provides deterministic unsigned integer utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
- ULongExtensions
Provides deterministic unsigned 64-bit integer utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
- UShortExtensions
Provides deterministic 16-bit unsigned integer (ushort) utility methods for the FishMMO framework. All calculations use pure integer math to ensure cross-platform consistency.
Interfaces
- IReference
Marker interface indicating that instances of the implementing type should be compared by reference equality rather than value equality. Used by collection types and equality comparers to select the appropriate comparison strategy at runtime.