AlirezaMahDev.Extensions.DataManager.Abstractions
0.0.1-alpha7
dotnet add package AlirezaMahDev.Extensions.DataManager.Abstractions --version 0.0.1-alpha7
NuGet\Install-Package AlirezaMahDev.Extensions.DataManager.Abstractions -Version 0.0.1-alpha7
<PackageReference Include="AlirezaMahDev.Extensions.DataManager.Abstractions" Version="0.0.1-alpha7" />
<PackageVersion Include="AlirezaMahDev.Extensions.DataManager.Abstractions" Version="0.0.1-alpha7" />
<PackageReference Include="AlirezaMahDev.Extensions.DataManager.Abstractions" />
paket add AlirezaMahDev.Extensions.DataManager.Abstractions --version 0.0.1-alpha7
#r "nuget: AlirezaMahDev.Extensions.DataManager.Abstractions, 0.0.1-alpha7"
#:package AlirezaMahDev.Extensions.DataManager.Abstractions@0.0.1-alpha7
#addin nuget:?package=AlirezaMahDev.Extensions.DataManager.Abstractions&version=0.0.1-alpha7&prerelease
#tool nuget:?package=AlirezaMahDev.Extensions.DataManager.Abstractions&version=0.0.1-alpha7&prerelease
AlirezaMahDev.Extensions.DataManager.Abstractions
Project Description
This project provides a set of abstractions for efficient data management in .NET applications. It offers a low-level, high-performance data access layer with support for memory-mapped files, data location tracking, and efficient data storage and retrieval. The library is designed to be extensible and can be used as a foundation for building custom data management solutions.
Key Features
- Data Location Management: Track and manage data locations with precise control over memory and storage.
- Type-Safe Data Access: Generic interfaces for type-safe data operations with support for custom value types.
- Memory Management: Efficient memory allocation and deallocation with support for large data sets.
- Asynchronous Operations: Full support for asynchronous data access patterns.
- Thread Safety: Built-in support for concurrent access with locking mechanisms.
- Extensible Design: Interfaces and base classes that can be extended for custom storage backends.
Core Interfaces
IDataAccess
The main interface for data access operations:
ReadMemory/ReadMemoryAsync: Read data from a specific offsetWriteMemory/WriteMemoryAsync: Write data to a specific offsetAllocateOffset: Allocate space for new dataGetRoot/GetTrash: Access root and trash locationsLock/UnLock: Thread synchronization
IDataLocation
Represents a location in the data store:
Offset: The position in the data storeLength: The size of the dataAccess: Reference to the underlying data accessMemory: Direct memory access to the data
Data Structures
- DataPath: Represents a path in the data store
- DataTrash: Manages deleted data locations for reuse
- String Types: Optimized fixed-size string types (String16, String32, String64, String128, String256)
- Collections: Interfaces for data collections and dictionaries
Usage Example
// Create a data access instance
IDataAccess dataAccess = /* implementation */;
// Allocate and write data
var location = DataLocation<MyValueType>.Create(dataAccess, default);
location.RefValue = new MyValueType { /* ... */ };
// Read data
var readLocation = DataLocation<MyValueType>.Read(dataAccess, location.Offset);
var value = readLocation.RefValue;
Design Principles
- Performance: Optimized for high-throughput, low-latency data access
- Type Safety: Strongly-typed interfaces prevent common errors
- Extensibility: Designed to be extended for various storage backends
- Memory Efficiency: Minimizes allocations and copies
- Thread Safety: Built-in support for concurrent access
Dependencies
- .NET 10.0: Base framework requirements
- System.Memory: For efficient memory operations
Architecture
The project follows a layered architecture:
- Abstraction Layer: Defines core interfaces and contracts
- Data Types: Implements value types and data structures
- Extensions: Provides utility methods and extensions
Implementation Notes
- The library uses
unmanagedconstraints for value types to ensure memory safety - All string types are fixed-size for predictable memory layout
- The data location system enables efficient data tracking and management
- The trash collection system helps with memory reuse and fragmentation prevention
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AlirezaMahDev.Extensions.DataManager.Abstractions:
| Package | Downloads |
|---|---|
|
AlirezaMahDev.Extensions.DataManager
Package Description |
|
|
AlirezaMahDev.Extensions.Brain.Abstractions
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1-alpha7 | 410 | 12/8/2025 |
| 0.0.1-alpha | 273 | 12/7/2025 |