Talk2Bits.MappingGenerator
0.0.0-alpha.0.50
This is a prerelease version of Talk2Bits.MappingGenerator.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Talk2Bits.MappingGenerator --version 0.0.0-alpha.0.50
NuGet\Install-Package Talk2Bits.MappingGenerator -Version 0.0.0-alpha.0.50
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="Talk2Bits.MappingGenerator" Version="0.0.0-alpha.0.50" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Talk2Bits.MappingGenerator --version 0.0.0-alpha.0.50
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Talk2Bits.MappingGenerator, 0.0.0-alpha.0.50"
#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.
// Install Talk2Bits.MappingGenerator as a Cake Addin
#addin nuget:?package=Talk2Bits.MappingGenerator&version=0.0.0-alpha.0.50&prerelease
// Install Talk2Bits.MappingGenerator as a Cake Tool
#tool nuget:?package=Talk2Bits.MappingGenerator&version=0.0.0-alpha.0.50&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MappingGenerator
MappingGenerator is C# source generator that allows generating object mapping code on compilation stage.
Having source code for your mappings generated provides the following benefits:
- Your mappings are always up to date.
- You see code for all your mappings. Nothing is hidden.
- All debugging features are available. You can step-in to your mappings, set breakpoints etc.
- If mapping can't be done or has issues you get compiler errors rather than runtime errors.
Note. C# source generators require NET5.0 or higher.
For more information check out the guide.
How do I get started?
Install Talk2Bits.MappingGenerator nuget package.
Define source and destination:
public class Source
{
public int Number { get; set; }
public string Text { get; set; }
public long BigNumber { get; set; }
}
public class Destination
{
public int Number { get; set; }
public string Text { get; set; }
public long BigNumber { get; set; }
}
Define mapper class:
[MappingGenerator(typeof(Source), typeof(Destination))]
public partial class Mapper
{ }
Rebuild your project
Use generated mapping:
var source = new Source();
var mapper = new Mapper();
var result = mapper.Map(source);
For more information check out Getting Started guide.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.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.0-preview.26 | 131 | 4/19/2022 |
1.0.0-preview.24 | 113 | 4/16/2022 |
1.0.0-preview.23 | 109 | 4/16/2022 |
1.0.0-preview.16 | 115 | 4/16/2022 |
1.0.0-preview.14 | 113 | 4/16/2022 |
1.0.0-preview.13 | 115 | 4/12/2022 |
1.0.0-preview.8 | 117 | 4/11/2022 |
1.0.0-preview.4 | 112 | 4/10/2022 |
1.0.0-preview.2 | 109 | 4/10/2022 |
1.0.0-preview | 114 | 4/10/2022 |
0.0.0-alpha.0.78 | 120 | 4/10/2022 |
0.0.0-alpha.0.77 | 113 | 4/9/2022 |
0.0.0-alpha.0.76 | 115 | 4/9/2022 |
0.0.0-alpha.0.73 | 122 | 4/7/2022 |
0.0.0-alpha.0.69 | 109 | 4/1/2022 |
0.0.0-alpha.0.64 | 106 | 4/1/2022 |
0.0.0-alpha.0.62 | 116 | 3/31/2022 |
0.0.0-alpha.0.53 | 108 | 3/30/2022 |
0.0.0-alpha.0.50 | 102 | 3/30/2022 |
0.0.0-alpha.0.47 | 106 | 3/30/2022 |
0.0.0-alpha.0.30 | 116 | 3/28/2022 |
0.0.0-alpha.0.29 | 114 | 3/28/2022 |
0.0.0-alpha.0.28 | 112 | 3/28/2022 |
0.0.0-alpha.0.27 | 115 | 3/28/2022 |
0.0.0-alpha.0.26 | 111 | 3/27/2022 |
0.0.0-alpha.0.25 | 111 | 3/27/2022 |
0.0.0-alpha.0.16 | 116 | 3/26/2022 |