Skip to content

Commit d6f03fc

Browse files
authored
Release/v1.2.0
* Release v1.2.0
1 parent e6eb454 commit d6f03fc

15 files changed

+1037
-133
lines changed

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
next-version: 1.0.0
1+
next-version: 1.2.0
22
tag-prefix: '[vV]'
33
mode: ContinuousDeployment
44
branches:

README.md

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# <img src="https://github.com/CodeShayk/TurboMapper/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> TurboMapper v1.0.0
1+
# <img src="https://github.com/CodeShayk/TurboMapper/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> TurboMapper v1.2.0
22
[![NuGet version](https://badge.fury.io/nu/TurboMapper.svg)](https://badge.fury.io/nu/TurboMapper) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/CodeShayk/TurboMapper/blob/master/LICENSE.md)
33
[![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/TurboMapper?logo=github&sort=semver)](https://github.com/CodeShayk/TurboMapper/releases/latest)
44
[![master-build](https://github.com/CodeShayk/TurboMapper/actions/workflows/Master-Build.yml/badge.svg)](https://github.com/CodeShayk/TurboMapper/actions/workflows/Master-Build.yml)
@@ -10,24 +10,65 @@
1010
## Introduction
1111
### What is TurboMapper?
1212
`TurboMapper` is a lightweight, high-performance object mapper for .NET that provides both shallow and deep mapping capabilities. It serves as a free alternative to AutoMapper with a simple, intuitive API.
13-
## Getting Started?
13+
14+
## Getting Started
1415
### i. Installation
1516
Install the latest version of TurboMapper nuget package with command below.
1617

1718
```
1819
NuGet\Install-Package TurboMapper
1920
```
20-
### ii. Developer Guide
21+
22+
### ii. Quick Start Example
23+
```csharp
24+
using TurboMapper;
25+
using Microsoft.Extensions.DependencyInjection;
26+
27+
// Setup
28+
var services = new ServiceCollection();
29+
services.AddTurboMapper();
30+
var serviceProvider = services.BuildServiceProvider();
31+
var mapper = serviceProvider.GetService<IMapper>();
32+
33+
// Define models
34+
public class Source
35+
{
36+
public string Name { get; set; }
37+
public int Age { get; set; }
38+
}
39+
40+
public class Target
41+
{
42+
public string Name { get; set; }
43+
public int Age { get; set; }
44+
}
45+
46+
// Map single object
47+
var source = new Source { Name = "John Doe", Age = 30 };
48+
var target = mapper.Map<Source, Target>(source);
49+
50+
// Map collections
51+
var sources = new List<Source>
52+
{
53+
new Source { Name = "Alice", Age = 25 },
54+
new Source { Name = "Bob", Age = 32 }
55+
};
56+
57+
// Map to IEnumerable<T>
58+
IEnumerable<Target> targets = mapper.Map<Source, Target>(sources);
59+
```
60+
61+
### iii. Developer Guide
2162
This comprehensive guide provides detailed information on TurboMapper, covering everything from basic concepts to advanced implementations and troubleshooting guidelines.
2263

2364
Please click on [Developer Guide](https://github.com/CodeShayk/TurboMapper/wiki) for complete details.
2465

2566
## Release Roadmap
26-
This section provides the summary of planned releases with key details about each release.
67+
This section provides the summary of planned releases with key details about each release.
2768

2869
| Release Version | Release Date | Key Features | Backward Compatibility | Primary Focus |
2970
|----------------|--------------|--------------|----------------------|---------------|
30-
| 1.2.0 | October 2025 | Performance improvements (2x+ speed), collection mapping, custom type converters, conditional mapping, transformation functions, configuration validation, improved error messages | ✅ Fully backward compatible | Core improvements, mapping features, custom conversions |
71+
| 1.2.0 | October 2025 | Performance improvements (2x+ speed), enhanced collection mapping API, custom type converters, conditional mapping, transformation functions, configuration validation, improved error messages | ✅ Fully backward compatible | Core improvements, mapping features, custom conversions |
3172
| 1.4.0 | Jan 2026 | Complex nested mapping, circular reference handling, performance diagnostics, generic collection interfaces, interface-to-concrete mapping, dictionary mapping, .NET Standard compatibility | ✅ Fully backward compatible | Advanced mapping, type features, enhanced conversions |
3273
| 2.1.0 | Mid 2026 | Pre-compiled mappings, reverse mapping, async transformations, async collection processing, LINQ expressions, projection support, detailed tracing | ❌ Contains breaking changes (new async methods in IMapper) | Next-gen features, async operations, data access integration |
3374

src/TurboMapper/IMapper.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
using System.Collections.Generic;
2+
13
namespace TurboMapper
24
{
35
public interface IMapper
46
{
57
TTarget Map<TSource, TTarget>(TSource source);
8+
9+
IEnumerable<TDestination> Map<TSource, TDestination>(IEnumerable<TSource> source);
10+
11+
ValidationResult ValidateMapping<TSource, TTarget>();
612
}
713
}

src/TurboMapper/IMappingExpression.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@ namespace TurboMapper
66
public interface IMappingExpression<TSource, TTarget>
77
{
88
IMappingExpression<TSource, TTarget> ForMember<TValue>(Expression<Func<TTarget, TValue>> targetMember, Expression<Func<TSource, TValue>> sourceMember);
9+
10+
IMappingExpression<TSource, TTarget> Ignore<TValue>(Expression<Func<TTarget, TValue>> targetMember);
11+
12+
IMappingExpression<TSource, TTarget> When<TValue>(Expression<Func<TTarget, TValue>> targetMember, Func<TSource, bool> condition);
13+
14+
IMappingExpression<TSource, TTarget> MapWith<TSourceValue, TTargetValue>(Expression<Func<TTarget, TTargetValue>> targetMember, Func<TSourceValue, TTargetValue> transformFunction);
915
}
1016
}

src/TurboMapper/IObjectMap.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23

34
namespace TurboMapper
@@ -7,5 +8,7 @@ internal interface IObjectMap
78
void CreateMap<TSource, TTarget>(List<PropertyMapping> mappings = null);
89

910
void CreateMap<TSource, TTarget>(List<PropertyMapping> mappings, bool enableDefaultMapping);
11+
12+
void RegisterConverter<TSource, TDestination>(Func<TSource, TDestination> converter);
1013
}
1114
}

0 commit comments

Comments
 (0)