AlirezaMahDev.Extensions.DataManager.Abstractions 0.0.1-alpha7

This is a prerelease version of AlirezaMahDev.Extensions.DataManager.Abstractions.
dotnet add package AlirezaMahDev.Extensions.DataManager.Abstractions --version 0.0.1-alpha7
                    
NuGet\Install-Package AlirezaMahDev.Extensions.DataManager.Abstractions -Version 0.0.1-alpha7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlirezaMahDev.Extensions.DataManager.Abstractions" Version="0.0.1-alpha7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlirezaMahDev.Extensions.DataManager.Abstractions" Version="0.0.1-alpha7" />
                    
Directory.Packages.props
<PackageReference Include="AlirezaMahDev.Extensions.DataManager.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlirezaMahDev.Extensions.DataManager.Abstractions --version 0.0.1-alpha7
                    
#r "nuget: AlirezaMahDev.Extensions.DataManager.Abstractions, 0.0.1-alpha7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlirezaMahDev.Extensions.DataManager.Abstractions@0.0.1-alpha7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlirezaMahDev.Extensions.DataManager.Abstractions&version=0.0.1-alpha7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AlirezaMahDev.Extensions.DataManager.Abstractions&version=0.0.1-alpha7&prerelease
                    
Install as a Cake Tool

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 offset
  • WriteMemory/WriteMemoryAsync: Write data to a specific offset
  • AllocateOffset: Allocate space for new data
  • GetRoot/GetTrash: Access root and trash locations
  • Lock/UnLock: Thread synchronization

IDataLocation

Represents a location in the data store:

  • Offset: The position in the data store
  • Length: The size of the data
  • Access: Reference to the underlying data access
  • Memory: 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

  1. Performance: Optimized for high-throughput, low-latency data access
  2. Type Safety: Strongly-typed interfaces prevent common errors
  3. Extensibility: Designed to be extended for various storage backends
  4. Memory Efficiency: Minimizes allocations and copies
  5. 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 unmanaged constraints 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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