FasterMapper 1.0.7
dotnet add package FasterMapper --version 1.0.7
NuGet\Install-Package FasterMapper -Version 1.0.7
<PackageReference Include="FasterMapper" Version="1.0.7" />
<PackageVersion Include="FasterMapper" Version="1.0.7" />
<PackageReference Include="FasterMapper" />
paket add FasterMapper --version 1.0.7
#r "nuget: FasterMapper, 1.0.7"
#:package FasterMapper@1.0.7
#addin nuget:?package=FasterMapper&version=1.0.7
#tool nuget:?package=FasterMapper&version=1.0.7
FasterMapper
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 | Versions 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. |
-
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.