Rop.Mapper 1.0.20

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rop.Mapper --version 1.0.20
                    
NuGet\Install-Package Rop.Mapper -Version 1.0.20
                    
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="Rop.Mapper" Version="1.0.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rop.Mapper" Version="1.0.20" />
                    
Directory.Packages.props
<PackageReference Include="Rop.Mapper" />
                    
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 Rop.Mapper --version 1.0.20
                    
#r "nuget: Rop.Mapper, 1.0.20"
                    
#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.
#addin nuget:?package=Rop.Mapper&version=1.0.20
                    
Install as a Cake Addin
#tool nuget:?package=Rop.Mapper&version=1.0.20
                    
Install as a Cake Tool

Rop.Mapper

Features

Rop.Mapper is an unobstrusive alternative to AutoMapper. Rop.Mapper allows maps entities using custom Attributes. Rop.Mapper works as Singleton or as Dependency Injection.

To easy use as Singleton, optionaly, mappeables entities can be signaled as IMappeable.

Direct Use

For entities signaled as IMappeable you can use Extensions Methods

public static Dst MapTo<Dst>(this IMappeable item) where Dst : class, new()
public static void MapTo<Dst>(this IMappeable item, Dst destiny) where Dst : class

For entities not signaled, you can use static class DefaultMapper

DefaultMapper.Map<Dst>(object item);
DefaultMapper.Map<Dst>(object item, Dst destiny)

As Dependency Injection

A mapper with custom converters can be instantiated.

Verify

You can verify right conversion rules between entities before use

Mapper.Verify<Src,Dst>();

Maps Attributes

// Universal
[MapsTo(string name)]
[MapsUseNullValue(object value)]
[MapsIgnore()]
[MapsFormat(string format)]
[MapsConversor(string conversor)]
[MapsSeparator(string separator)]
// When destination entity is of certain type
[MapsToIf(string name,Type dst)]
[MapsIgnoreIf(Type dst)]
[MapsFormatIf(string format,Type dst)]
[MapsConversorIf(string conversor,Type dst)]
// When origin entity is if certain type
[MapsFrom(string name,Type src)]
[MapsFromConversor(string conversor,Type src)]

(C)2022 Ramón Ordiales Plaza

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.

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.23 279 4/20/2023
1.0.22 217 4/20/2023
1.0.21 347 1/8/2023
1.0.20 337 12/22/2022
1.0.19 345 12/19/2022
1.0.18 478 9/25/2022
1.0.17 463 9/23/2022
1.0.16 427 9/5/2022
1.0.15 443 9/5/2022
1.0.14 447 9/2/2022
1.0.13 424 9/2/2022
1.0.12 427 9/1/2022
1.0.11 423 9/1/2022
1.0.10 441 8/31/2022
1.0.9 435 8/31/2022
1.0.8 463 8/31/2022
1.0.7 462 8/30/2022
1.0.6 431 8/30/2022
1.0.5 437 8/29/2022
1.0.4 424 8/29/2022
1.0.3 430 8/29/2022
1.0.2 442 8/29/2022
1.0.1 431 8/28/2022