![]() |
VOOZH | about |
dotnet add package Boxed.Mapping --version 7.0.0
NuGet\Install-Package Boxed.Mapping -Version 7.0.0
<PackageReference Include="Boxed.Mapping" Version="7.0.0" />
<PackageVersion Include="Boxed.Mapping" Version="7.0.0" />Directory.Packages.props
<PackageReference Include="Boxed.Mapping" />Project file
paket add Boxed.Mapping --version 7.0.0
#r "nuget: Boxed.Mapping, 7.0.0"
#:package Boxed.Mapping@7.0.0
#addin nuget:?package=Boxed.Mapping&version=7.0.0Install as a Cake Addin
#tool nuget:?package=Boxed.Mapping&version=7.0.0Install as a Cake Tool
👁 Boxed.Mapping
👁 Boxed.Mapping NuGet Package Downloads
A simple and fast (fastest?) object to object mapper that does not use reflection. Read A Simple and Fast Object Mapper for more information.
public class MapFrom
{
public bool BooleanFrom { get; set; }
public int IntegerFrom { get; set; }
public List<MapFromChild> ChildrenFrom { get; set; }
}
public class MapFromChild
{
public DateTimeOffset DateTimeOffsetFrom { get; set; }
public string StringFrom { get; set; }
}
public class MapTo
{
public bool BooleanTo { get; set; }
public int IntegerTo { get; set; }
public List<MapToChild> ChildrenTo { get; set; }
}
public class MapToChild
{
public DateTimeOffset DateTimeOffsetTo { get; set; }
public string StringTo { get; set; }
}
public class DemoMapper : IMapper<MapFrom, MapTo>
{
private readonly IMapper<MapFromChild, MapToChild> childMapper;
public DemoMapper(IMapper<MapFromChild, MapToChild> childMapper) => this.childMapper = childMapper;
public void Map(MapFrom source, MapTo destination)
{
destination.BooleanTo = source.BooleanFrom;
destination.IntegerTo = source.IntegerFrom;
destination.ChildrenTo = childMapper.MapList(source.ChildrenFrom);
}
}
public class DemoChildMapper : IMapper<MapFromChild, MapToChild>
{
public void Map(MapFromChild source, MapToChild destination)
{
destination.DateTimeOffsetTo = source.DateTimeOffsetFrom;
destination.StringTo = source.StringFrom;
}
}
public class UsageExample
{
private readonly IMapper<MapFrom, MapTo> mapper = new DemoMapper();
public MapTo MapOneObject(MapFrom source) => this.mapper.Map(source);
public MapTo[] MapArray(List<MapFrom> source) => this.mapper.MapArray(source);
public List<MapTo> MapList(List<MapFrom> source) => this.mapper.MapList(source);
public IAsyncEnumerable<MapTo> MapAsyncEnumerable(IAsyncEnumerable<MapFrom> source) =>
this.mapper.MapEnumerableAsync(source);
}
Also includes IImmutableMapper<TSource, TDestination> which is for mapping to immutable types like C# 9 record's and can also be used for enum types.
public record MapFrom(bool BooleanFrom, int IntegerFrom);
public record MapTo(bool BooleanTo, int IntegerTo);
public class DemoImmutableMapper : IImmutableMapper<MapFrom, MapTo>
{
public MapTo Map(MapFrom source) =>
new MapTo(source.BooleanFrom, source.IntegerFrom);
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp1.0 netcoreapp1.0 was computed. netcoreapp1.1 netcoreapp1.1 was computed. netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.3 netstandard1.3 is compatible. netstandard1.4 netstandard1.4 was computed. netstandard1.5 netstandard1.5 was computed. netstandard1.6 netstandard1.6 was computed. netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net46 net46 was computed. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen30 tizen30 was computed. tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Universal Windows Platform | uap uap was computed. uap10.0 uap10.0 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Boxed.Mapping:
| Package | Downloads |
|---|---|
|
WebScheduler.Client.Core
The core client library for the WebScheduler server. |
|
|
Uponey.Core.Contract
Package Description |
|
|
PikTools.Modules.Pylons.Shared
PikTools core library for Modules Pylons |
|
|
idee5.EventStoreLite
Basic event store implementation |
|
|
Kasp.ObjectMapper.Benchmark
Package Description |
Showing the top 1 popular GitHub repositories that depend on Boxed.Mapping:
| Repository | Stars |
|---|---|
|
Dotnet-Boxed/Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.0 | 148,626 | 9/14/2023 |
| 6.0.0 | 279,160 | 11/9/2021 |
| 5.3.0 | 108,808 | 3/11/2021 |
| 5.2.0 | 34,329 | 12/3/2020 |
| 5.1.0 | 5,456 | 11/23/2020 |
| 5.0.0 | 37,901 | 7/20/2020 |
| 4.0.0 | 79,598 | 3/17/2020 |
| 3.0.0 | 35,773 | 11/30/2019 |
| 2.0.0 | 9,914 | 9/13/2019 |
| 1.4.0 | 13,606 | 7/14/2019 |
| 1.3.0 | 32,262 | 12/27/2018 |
| 1.2.0 | 37,857 | 7/13/2018 |
| 1.1.0 | 3,277 | 5/25/2018 |
| 1.0.0 | 3,630 | 5/6/2018 |