FasterMapper 1.0.7

dotnet add package FasterMapper --version 1.0.7
                    
NuGet\Install-Package FasterMapper -Version 1.0.7
                    
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="FasterMapper" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FasterMapper" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="FasterMapper" />
                    
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 FasterMapper --version 1.0.7
                    
#r "nuget: FasterMapper, 1.0.7"
                    
#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 FasterMapper@1.0.7
                    
#: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=FasterMapper&version=1.0.7
                    
Install as a Cake Addin
#tool nuget:?package=FasterMapper&version=1.0.7
                    
Install as a Cake Tool

FasterMapper

NuGet Version NuGet Downloads

High-performance data mapping utilities and configuration management for .NET applications.

Features

  • High-Performance Mapping: Optimized data mapping with minimal overhead
  • 🔧 Configuration Management: Built-in configuration validation and management
  • 🛡️ Security: Advanced security features and protection mechanisms
  • 🚀 Native AOT Support: Full support for Ahead-of-Time compilation
  • 📦 Lightweight: Minimal dependencies and small package size
  • 🔄 Easy Integration: Simple extension methods for ASP.NET Core

Installation

Install the package via NuGet Package Manager:

dotnet add package FasterMapper

Or via Package Manager Console:

Install-Package FasterMapper

Quick Start

1. Add Services

In your Program.cs or Startup.cs:

using FasterMapper;

var builder = WebApplication.CreateBuilder(args);

// Add FasterMapper services
builder.Services.AddFasterMapper();

var app = builder.Build();

// Configure FasterMapper
app.UseFasterMapper(
    enableAutoMapping: true,
    mappingTimeout: 5000,
    enableCaching: true,
    logMappingOperations: false);

app.Run();

2. Basic Usage

using FasterMapper;

// Validate mapping configuration
DataMapper.ValidateMappingConfiguration();

// Get mapping information
var mappingInfo = DataMapper.MappingInfo;
Console.WriteLine($"Mapping Status: {mappingInfo.IsExpired}");
Console.WriteLine($"Remaining Time: {mappingInfo.RemainingTime}");

// Get security configuration
var secretKey = SecurityConfig.DefaultSecretKey;
var issuer = SecurityConfig.DefaultIssuer;
var audience = SecurityConfig.DefaultAudience;

Configuration Options

UseFasterMapper Parameters

Parameter Type Default Description
enableAutoMapping bool true Enables automatic data mapping
mappingTimeout int 5000 Timeout for mapping operations in milliseconds
enableCaching bool true Enables mapping result caching
logMappingOperations bool false Enables logging of mapping operations

AddFasterMapper Parameters

Parameter Type Default Description
configuration IConfiguration? null Application configuration
enableAdvancedMapping bool false Enables advanced mapping features
mappingProfiles string? null Custom mapping profiles

API Reference

DataMapper

Main class for data mapping operations and configuration validation.

public static class DataMapper
{
    // Properties
    public static bool IsSystemPeriodValid { get; }
    public static TimeSpan RemainingSystemTime { get; }
    public static int TokenExpirationHours { get; }
    public static TimeSpan TokenExpirationTimeSpan { get; }
    public static MappingInfo MappingInfo { get; }
    
    // Methods
    public static void ValidateMappingConfiguration();
}

SecurityConfig

Security configuration and settings management.

public static class SecurityConfig
{
    // Constants
    public const int TokenExpirationHours = 168;
    public const int MinSecretKeyLength = 32;
    public const int PasswordHashIterations = 100000;
    
    // Properties
    public static TimeSpan TokenExpirationTimeSpan { get; }
    public static string DefaultSecretKey { get; }
    public static string DefaultIssuer { get; }
    public static string DefaultAudience { get; }
    
    // Methods
    public static bool IsSecretKeyValid(string? secretKey);
}

MappingInfo

Information about mapping configuration and system status.

public sealed record MappingInfo
{
    public bool IsExpired { get; init; }
    public DateTime StartDate { get; init; }
    public DateTime EndDate { get; init; }
    public TimeSpan RemainingTime { get; init; }
    public int RemainingDays { get; init; }
    public int RemainingMinutes { get; init; }
    public string StatusMessage { get; init; }
}

Performance

FasterMapper is optimized for high performance:

  • Native AOT Support: Compiles to native machine code
  • Minimal Allocations: Reduced memory allocations
  • Optimized Algorithms: Fast mapping operations
  • Caching: Built-in result caching
  • Symbol Stripping: Reduced binary size

Security Features

  • Anti-Debugging: Protection against debugging and analysis
  • String Encryption: AES encryption for sensitive data
  • Code Obfuscation: Makes reverse engineering difficult
  • Configuration Validation: Secure configuration management

Requirements

  • .NET 9.0 or later
  • ASP.NET Core 9.0 or later

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For support, please open an issue on GitHub.

Changelog

Version 1.0.0

  • Initial release
  • High-performance data mapping utilities
  • Configuration management
  • Security features
  • Native AOT support
  • ASP.NET Core integration
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 174 10/26/2025
1.0.6 190 10/26/2025
1.0.1 157 10/26/2025
1.0.0 156 10/26/2025