DTOMaker.Runtime.MemBlocks 1.7.20-dev

This is a prerelease version of DTOMaker.Runtime.MemBlocks.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DTOMaker.Runtime.MemBlocks --version 1.7.20-dev
                    
NuGet\Install-Package DTOMaker.Runtime.MemBlocks -Version 1.7.20-dev
                    
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="DTOMaker.Runtime.MemBlocks" Version="1.7.20-dev" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DTOMaker.Runtime.MemBlocks" Version="1.7.20-dev" />
                    
Directory.Packages.props
<PackageReference Include="DTOMaker.Runtime.MemBlocks" />
                    
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 DTOMaker.Runtime.MemBlocks --version 1.7.20-dev
                    
#r "nuget: DTOMaker.Runtime.MemBlocks, 1.7.20-dev"
                    
#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.
#:package DTOMaker.Runtime.MemBlocks@1.7.20-dev
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DTOMaker.Runtime.MemBlocks&version=1.7.20-dev&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DTOMaker.Runtime.MemBlocks&version=1.7.20-dev&prerelease
                    
Install as a Cake Tool

DTOMaker

Build-Deploy NuGet Version NuGet Downloads GitHub License GitHub Sponsors

Warning: This is pre-release software under active development. Breaking changes may occur.

Model-driven compile-time source generators for quickly creating polymorphic, freezable DTOs (Data Transport Objects) supporting various serialization protocols:

  • JSON (System.Text.Json)
  • JSON (Newtonsoft.Json)
  • MessagePack 2.x
  • MemBlocks

Workflow

flowchart TB
    def(Define models e.g. IMyDTO.cs)
    ref1(Reference DTOMaker.Models)
    ref2(Reference runtime e.g. DTOMaker.Runtime.JsonSystemText)
    ref3(Reference source generator e.g. DTOMaker.SrcGen.JsonSystemText)
    bld(Build/Run)
    ref1-->def
    def-->ref2
    ref2-->ref3
    ref3-->bld

Models are defined as C# interfaces with additional attributes. So let's start with a non-trivial model. Here's how to define a polymorphic, recursive tree type:

using DTOMaker.Models;
using DTOMaker.Runtime;
namespace MyModels;
[Entity(1)] public interface INode : IEntityBase
{
    [Member(1)] String Key { get; set; } 
}
[Entity(2)] public interface IStringNode : INode
{
    [Member(1)] String Value { get; set; } 
}
[Entity(3)] public interface INumberNode : INode
{
    [Member(1)] Int64 Value  { get; set; } 
}
[Entity(4)] public interface ITree : IEntityBase
{
    [Member(1)] ITree? Left  { get; set; }
    [Member(2)] ITree? Right { get; set; }
    [Member(3)] INode? Node  { get; set; }
}

When you add a reference to the DTOMaker.SrcGen.JsonSystemText package, the implmentations will be generated in the MyModels.JsonSystemText namespace.

Development

In progress

  • custom value type converters

Coming soon

  • more custom (ref and value) type converters

Coming later

  • MessagePack 3.x serialization
  • Orleans serialization
  • Protobuf.Net serialization
  • model.json generation
  • command-line alternative
  • variant native type support
  • variable length arrays
  • logical value equality
  • common pattern extensions

How to sponsor

If you find these tools useful, please consider sponsoring my work on GitHub at https://github.com/sponsors/Psiman62 or buy me a coffee at https://www.buymeacoffee.com/psiman62

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

Product 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 is compatible.  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 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 is compatible.  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. 
.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.

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.8.7 79 1/26/2026
1.8.6 79 1/23/2026
1.8.4 92 1/22/2026
1.8.1-dev 81 1/22/2026
1.7.25 79 1/19/2026
1.7.22 83 1/18/2026
1.7.20-dev 79 1/18/2026
1.7.18-dev 80 1/18/2026
1.7.8-dev 82 1/17/2026
1.7.1-dev 85 1/8/2026
1.6.12 87 1/6/2026
1.6.10 89 1/4/2026
1.6.2 89 1/3/2026
1.6.1 87 1/3/2026
1.5.23 88 1/1/2026
1.5.22-dev 85 1/1/2026
1.5.19-dev 86 1/1/2026
1.5.18-dev 101 12/28/2025
1.5.13-dev 94 12/27/2025
1.5.4-dev 138 12/26/2025
0.71.8 158 10/3/2025
0.71.7 307 9/19/2025
0.71.6 330 9/17/2025
0.71.5 329 9/16/2025
0.71.4 271 9/15/2025
0.71.3 266 9/15/2025
0.71.1 260 9/15/2025
0.70.3 195 9/9/2025
0.70.2 191 9/2/2025
0.70.1-dev 230 8/27/2025
0.69.10 177 8/17/2025
0.69.9 121 8/16/2025
0.69.8 195 8/13/2025
0.69.7-dev 191 8/13/2025
0.69.6-dev 181 8/12/2025
0.69.4-dev 159 8/9/2025
0.69.3-dev 102 7/19/2025
0.69.2-dev 104 7/19/2025
0.68.6 108 7/19/2025
0.68.5-dev 110 7/19/2025
0.68.2-dev 178 7/17/2025
0.68.1-dev 189 7/17/2025
0.67.7 188 7/17/2025
0.67.6-dev 191 7/9/2025
0.67.5-dev 181 7/9/2025
0.67.3-dev 184 7/7/2025
0.67.1-dev 331 6/10/2025
0.66.18 298 6/9/2025
0.66.17-dev 268 6/9/2025
0.66.16-dev 163 6/8/2025
0.66.14-dev 119 6/7/2025
0.66.13-dev 184 6/5/2025
0.66.10-dev 192 6/5/2025
0.66.9-dev 192 6/5/2025
0.66.8-dev 189 6/5/2025
0.66.7-dev 184 6/4/2025
0.66.2-dev 113 5/31/2025
0.65.20-generics-g24a665d336 109 5/31/2025
0.65.13-generics-ge74b19332f 200 4/23/2025
0.65.10-generics-g6f262eb134 236 4/17/2025
0.65.1-generics 121 5/31/2025
0.64.27 179 5/27/2025
0.64.26 253 5/16/2025
0.64.24 198 5/8/2025
0.64.22 203 4/23/2025
0.64.20 211 4/10/2025
0.64.18 209 4/10/2025
0.64.17 207 4/10/2025
0.64.16 213 4/9/2025
0.64.10 208 4/7/2025
0.64.9 173 4/4/2025
0.64.8-dev 202 4/1/2025
0.64.7-dev-g53a80ba3be 180 4/1/2025
0.64.5-dev-g449e36f771 538 3/25/2025
0.64.5-dev-g2fcf9bff64 194 4/1/2025
0.64.4-dev 196 4/1/2025
0.64.3-dev 200 3/31/2025
0.64.2-dev 526 3/25/2025
0.64.1-dev 533 3/25/2025
0.63.60-gee4d301e03 524 3/25/2025
0.63.19 154 3/21/2025
0.63.19-g2e909c64aa 145 3/21/2025
0.63.17 176 3/14/2025
0.63.16 176 3/14/2025
0.63.15 201 3/13/2025
0.63.13 214 3/11/2025
0.63.12 206 3/11/2025
0.63.11-dev 200 3/11/2025
0.63.9-dev 205 3/11/2025
0.63.8-dev 204 3/10/2025
0.63.7-dev 197 3/10/2025
0.63.6-dev 210 3/10/2025
0.63.3-dev 185 3/10/2025
0.62.10 268 3/8/2025
0.62.9 272 3/8/2025
0.62.7 261 3/7/2025
0.62.6-dev 249 3/7/2025
0.62.5-dev 253 3/7/2025
0.61.14 268 3/6/2025
0.61.13-dev 232 3/6/2025
0.61.12-dev 242 3/6/2025
0.61.10-dev 266 3/6/2025
0.61.9-dev 258 3/5/2025
0.61.8-dev 242 3/5/2025
0.61.5-dev 242 3/4/2025
0.61.3-dev 236 3/4/2025
0.61.2-dev 178 3/3/2025
0.60.8 170 2/27/2025
0.60.7 147 2/27/2025
0.60.6-dev 127 2/27/2025
0.60.3-dev 122 2/25/2025
0.59.10 167 2/19/2025
0.59.8-dev 148 2/19/2025
0.59.5-dev 145 2/17/2025
0.59.4-dev 139 2/15/2025
0.58.9 157 2/4/2025
0.58.8-dev 130 2/4/2025
0.57.6 163 2/1/2025
0.57.4 158 2/1/2025
0.57.2-dev 150 2/1/2025
0.57.1-dev 134 2/1/2025
0.56.13 160 1/31/2025
0.56.12-dev 136 1/31/2025
0.56.11-dev 137 1/30/2025
0.56.10-dev 137 1/30/2025
0.56.9-dev 144 1/30/2025
0.56.6-dev 128 1/24/2025
0.56.5-dev 142 1/24/2025
0.56.4-dev 130 1/24/2025
0.56.3-dev 128 1/24/2025
0.55.38 161 1/23/2025
0.55.37-dev 141 1/23/2025
0.55.36-dev 143 1/22/2025
0.55.34-dev 141 1/22/2025
0.55.32-dev 129 1/22/2025
0.55.31-dev 139 1/21/2025
0.55.30-dev 144 1/21/2025
0.55.29-dev 130 1/20/2025
0.55.27-dev 139 1/20/2025
0.55.25-dev 139 1/20/2025
0.55.24-dev 135 1/20/2025
0.55.23-dev 128 1/19/2025
0.55.20-dev 130 1/19/2025
0.55.17-dev 128 1/19/2025
0.55.14-dev 127 1/19/2025
0.54.2 162 1/3/2025
0.54.1-dev 148 1/3/2025
0.53.4 168 1/1/2025
0.53.3 154 1/1/2025
0.53.2 175 12/31/2024
0.53.1-dev 129 12/31/2024
0.52.1 153 12/31/2024
0.51.1 137 12/31/2024
0.50.2 147 12/31/2024
0.50.1-dev 116 12/31/2024
0.49.7 145 12/31/2024
0.49.6 156 12/29/2024
0.49.5-dev 137 12/29/2024
0.49.4-dev 148 12/29/2024